现在找到一些相关资料,简单做一分析。 -------------------------------效果---------------http://i6677.com/fun/mouse/mouse14.html ------------------------------代码---------------- <STYLE>.skin0{BACKGROUND-COLOR: menu; BORDER-BOTTOM: black 2px solid; BORDER-LEFT: black 2px solid; BORDER-RIGHT: black 2px solid; BORDER-TOP: black 2px solid; CURSOR: default; FONT-FAMILY: 宋体;font-size:9pt; LINE-HEIGHT: 18px; POSITION: absolute; TEXT-ALIGN: left; VISIBILITY: hidden; WIDTH: 150px}.skin1{BACKGROUND-COLOR: menu; BORDER-BOTTOM: buttonhighlight 2px outset; BORDER-LEFT: buttonhighlight 2px outset; BORDER-RIGHT: buttonhighlight 2px outset; BORDER-TOP: buttonhighlight 2px outset; CURSOR: default; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; POSITION: absolute; TEXT-ALIGN: left; VISIBILITY: hidden; WIDTH: 120px}.menuitems{PADDING-LEFT: 15px; PADDING-RIGHT: 10px}</STYLE> <SCRIPT>var menuskin="skin0";var display_url=0;function showmenuie5(){var rightedge=document.body.clientWidth-event.clientX;var bottomedge=document.body.clientHeight-event.clientY;if(rightedge<ie5menu.offsetWidth)ie5menu.style.left=document.body.scrollLeft+event.clientX -ie5menu.offsetWidth;else ie5menu.style.left=document.body.scrollLeft + event.clientX;if(bottomedge<ie5menu.offsetHeight) ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight;else ie5menu.style.top = document.body.scrollTop+event.clientY;ie5menu.style.visibility="visible";return false;};function hidemenuie5(){ie5menu.style.visibility = "hidden";};function highlightie5(){if(event.srcElement.className=="menuitems"){event.srcElement.style.backgroundColor="highlight";event.srcElement.style.color="white";if(display_url)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>
<DIV class=skin0 id=ie5menu onclick=jumptoie5() onmouseout=lowlightie5() onmouseover=highlightie5()><DIV class=menuitems url="javascript:history.back();">返回</DIV><DIV class=menuitems url="../../index.htm">回首页</DIV><HR><DIV class=menuitems url="http://www.163.com">网易</DIV><DIV class=menuitems url="http://www.sohu.com">搜狐</DIV><HR><DIV class=menuitems url="http://netsh.com">乐趣园</DIV><DIV class=menuitems url="http://netshfun.clubhi.com">论坛乐趣</DIV></DIV>
<SCRIPT>if(document.all&&window.print){ie5menu.className=menuskin;document.oncontextmenu=showmenuie5;document.body.onclick=hidemenuie5;}</SCRIPT>
|