<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>