一个右建菜单,还没有写好的

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>office右键</title>
<style type="text/css">
body {
 margin: 0px;
 padding: 0px;
}
.menu {
 font-size:9pt;
 border:1px white solid;
}
</style>

</head>

<body οncοntextmenu="return false;">

<div id="L1" style="position:absolute; left: 100px; top: 40px; width: 300px; height: 400px; background-color: white; border: 1px black solid; filter:progid:DXImageTransform.Microsoft.Glow(color='blue', Strength='2'); visibility: show">

fdsfdsfdsfds
</div>
<script language=javascript>
document.all.L1.onmouseup = onMouseUp

function onMouseUp()
{
 e = window.event;
 if (e.button == 2)
 {
  //alert(document.all.pop1);
  pop1.style.left= e.clientX;
  pop1.style.top = e.clientY;
  pop1.style.display = 'block';
 }
 if (e.button == 1)
 {
  pop1.style.display = 'none';
 }

}

function popMouseMove(e)
{

 //e.style.border="1px blue solid";
 e.style.cursor = 'default';
 e.children(0).style.borderLeft="1px blue solid";
 e.children(0).style.borderTop="1px blue solid";
 e.children(0).style.borderBottom="1px blue solid";
 e.children(0).style.borderRight="0px";
 e.children(0).style.backgroundColor = 'lightblue';
 e.children(1).style.borderRight="1px blue solid";
 e.children(1).style.borderTop="1px blue solid";
 e.children(1).style.borderBottom="1px blue solid";
 e.children(1).style.borderLeft="0px";
 e.children(1).style.backgroundColor = 'lightblue';

}
function popMouseOut(e)
{
 //e.style.border="0px;"
 e.style.cursor = 'default';
 e.children(0).style.borderLeft="1px white solid";
 e.children(0).style.borderTop="1px white solid";
 e.children(0).style.borderBottom="1px white solid";
 e.children(0).style.borderRight="0px";
 e.children(0).style.backgroundColor = 'white';
 e.children(1).style.borderRight="1px white solid";
 e.children(1).style.borderTop="1px white solid";
 e.children(1).style.borderBottom="1px white solid";
 e.children(1).style.borderLeft="0px";
 e.children(1).style.backgroundColor = 'white';
 
}
</script>
在区域中点击右键

<div id="pop1" style="position:absolute; left: 500px; top: 200px; width: 100px; height: 100px; display:none; background-color: white; border: 1px blue solid; filter:progid:DXImageTransform.Microsoft.Shadow(color='gray', Strength='2', direction='135'); ">
<table border=0 CELLPADDING=0 CELLSPACING=0 style="border : 0px;" align=center>
</tr>
<td height=2 width=22 style="border: 0px;"></td>
<td class=menu></td>
</tr>
<tr οnmοusemοve="popMouseMove(this);" οnmοuseοut="popMouseOut(this);">
<td width=22 height=20 class=menu><img src="images/post/mode.view.gif"></td>
<td class=menu>Menu1</td>
</tr>
<tr οnmοusemοve="popMouseMove(this);" οnmοuseοut="popMouseOut(this);">
<td width=22 height=22 class=menu><img src="images/post/mode.view.gif"></td>
<td  width=68 class=menu>Menu2</td>
</tr>
<tr οnmοusemοve="popMouseMove(this);" οnmοuseοut="popMouseOut(this);">
<td width=22 height=22 class=menu><img src="images/post/mov.gif"></td>
<td class=menu>Menu3</td>
</tr>
<tr>
<td height=5 width=22 style="border: 0px;"></td>
<td ><hr style="color:blue; height:1px;"></td>
</tr>

<tr οnmοusemοve="popMouseMove(this);" οnmοuseοut="popMouseOut(this);">
<td width=22 height=22 class=menu><img src="images/post/smiley.gif"></td>
<td class=menu>About</td>
</tr>
<td height=2 width=22 style="border: 0px;"></td>
<td class=menu></td>
</tr>

</table>
</div>
</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值