鼠标右键的菜单,挺好的啊!

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>

<!-- 把如下代码加入<body>区域中 -->

请单击鼠标右键看看效果

<!-- http://www.webjx.com -->

<!-- bbs http://www.webjx.com/bbs-->

<STYLE>.skin0 {

BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; VISIBILITY: hidden; BORDER-LEFT: black 1px solid; WIDTH: 150px; CURSOR: default; LINE-HEIGHT: 1px; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Verdana; POSITION: absolute; BACKGROUND-COLOR: black; TEXT-ALIGN: left

}

.skin1 {

BORDER-RIGHT: buttonhighlight 0px outset; BORDER-TOP: buttonhighlight 0px outset; FONT-SIZE: 9pt; VISIBILITY: hidden; BORDER-LEFT: buttonhighlight 0px outset; WIDTH: 120px; CURSOR: default; BORDER-BOTTOM: buttonhighlight 0px outset; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: absolute; BACKGROUND-COLOR: #000000; TEXT-ALIGN: center

}

.menuitems {

PADDING-RIGHT: 10px; PADDING-LEFT: 10px

}

</STYLE>

<SCRIPT language=JavaScript1.2>

<!-- Begin

var menuskin = "skin1"; // skin0, or skin1

var display_url = 0; // Show URLs in status bar?

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;

}

}

// End -->

</SCRIPT>

<DIV class=skin0 id=ie5menu onmouseover=highlightie5()

style="LEFT: 280px; TOP: 28px" onclick=jumptoie5(); onmouseout=lowlightie5()>

<DIV>

<TABLE height="97%" cellSpacing=1 cellPadding=0 width="98%" align=center

bgColor=#000000>

<TBODY>

<TR>

<TD

onmouseover="this.style.backgroundColor='#999900'; this.style.cursor='hand';"

onmouseout="this.style.backgroundColor='#99cc33';" bgColor=#99cc00 height=20

scroll="no" onload="window.defaultStatus='';">

<CENTER>::<BR>::Welcome:: </CENTER></TD></TR>

<TR>

<TD

onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='e-resize';"

onmouseout="this.style.backgroundColor='#ffcc00';" bgColor=#ffcc00

height=20>

<CENTER>::

<SCRIPT language=JavaScript>function bookmarkit(){window.external.addFavorite('http://www.webjx.com','::网页教学网::')}if (document.all)document.write('<a href="#" onClick="bookmarkit()">加入收藏</a>')</SCRIPT>

:: </CENTER></TD></TR>

<TR>

<TD

onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='e-resize';"

onmouseout="this.style.backgroundColor='#ffffff';" vAlign=center

bgColor=#ffffff>

<CENTER>::<A href="http://www.webjx.com/" target=_blank>webjx.com</A>::

</CENTER></TD></TR>

<TR>

<TD

onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='e-resize';"

onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center

bgColor=#ffcc00>

<CENTER>::<A title=web@webjx.com

href="mailto:web@webjx.com">联系站长</A>:: </CENTER></TD></TR>

</TBODY></TABLE></DIV></DIV>

<SCRIPT language=JavaScript1.2>

if (document.all && window.print) {

ie5menu.className = menuskin;

document.oncontextmenu = showmenuie5;

document.body.onclick = hidemenuie5;

}

</SCRIPT>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航