大家看看我的修改的一个关于右键菜单的程序,特别是,meizz(梅花雨)
apboy 2002-07-25 06:45:58 <html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<style>
.skin0{
position:absolute;
width:150px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.skin1{
cursor: default;
font: menutext;
position: absolute;
width: 150px;
background-color: menu;
border: 1 solid buttonface;
visibility:hidden;
border: 2 outset buttonhighlight;
}
.menuitems{
padding-left:15px;
padding-right:10px;
}
</style>
<script language=Javascript>
function down(tid,gid){
if(event.button==2){
ie5menu.className="skin1";
ie5menu.style.left=document.body.scrollLeft+event.clientX;
ie5menu.style.top=document.body.scrollTop+event.clientY;
ie5menu.style.visibility="visible";
}
}
//set the skin of the menu (0 or 1, with 1 rendering a default Windows menu like skin)
var menuskin=1
//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=0
function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}
function lowlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}
function jumptoie5(){
if (event.srcElement.className=="menuitems"){
if (event.srcElement.getAttribute("target")!=null)
window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
else
window.location=event.srcElement.url
}
}
</SCRIPT>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p>
<p>
<p>
<p>
<a href="http://www.sina.com.cn" onmousedown="javascript:down('id1','002')">连接一</a><br>
<a href="http://www.163.com" onmousedown="javascript:down('id1','002')">连接二</a>
</p>
</p>
</p>
</p>
<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5()">
<div class="menuitems" url="addGroup.htm" target="main">添加子组</div>
<div class="menuitems" url="delGroup.jsp" target="main">修改该组</div>
<div class="menuitems" url="#">删除该组</div>
</div>
</body>
</html>