|
|
| 彩色右键菜单 |
| 整理:Cnwshow.Com 来源:Internet 整理时间:2008-2-17 |
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>彩色右键菜单</title>
<style>
.skin {BORDER-RIGHT: buttonhighlight 0px outset; BORDER-TOP: buttonhighlight 0px outset; FONT-SIZE: 9pt; VISIBILITY: hidden; BORDER-LEFT: buttonhighlight 0px outset; WIDTH: 100px; 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}
td { font-size: 9pt; font-family: "宋体"}
</style>
</head>
<body>
<script language="JavaScript1.2">
<!-- Begin
var menuskin = "skin";
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="skin" id="ie5menu"
onmouseover="highlightie5()" style="LEFT: 46px; TOP: 26px" onClick="jumptoie5();"
onmouseout="lowlightie5()">
<div>
<table height="100%" cellSpacing="1" cellPadding="0" width="100%" align="center"
bgColor="#000000">
<TBODY>
<tr>
<td onMouseOver="this.style.backgroundColor='#999900';" onMouseOut="this.style.backgroundColor='#99cc33';"
bgColor="#99cc33" height="20"><p align="center"><a href="http://www.google.cn" target="_blank">google</a></td>
</tr>
<tr>
<td onMouseOver="this.style.backgroundColor='#ff9900';" onMouseOut="this.style.backgroundColor='#ffcc00';"
bgColor="#ffcc00" height="20"><p align="center"><a href="http://www.baidu.com" target="_blank">百度</a></td>
</tr>
<tr>
<td onMouseOver="this.style.backgroundColor='#8C8CFF';" onMouseOut="this.style.backgroundColor='#CACAFF';"
bgColor="#CACAFF" height="20"><p align="center"><a href="http://www.cnwshow.com" target="_blank">个人网秀</a></td>
</tr>
<tr>
<td onMouseOver="this.style.backgroundColor='#D1A4FF';" onMouseOut="this.style.backgroundColor='#00CCCC';"
bgColor="#00CCCC" height="20"><p align="center"><a href="http://www.qq.com" target="_blank">QQ</a></td>
</tr>
<tr>
<td onMouseOver="this.style.backgroundColor='#B36666';" onMouseOut="this.style.backgroundColor='#D7AEAE';"
bgColor="#D7AEAE" height="20"><p align="center"><a href="http://www.newhua.com" target="_blank">华军软件</a></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>
<p></p>
<p>说明:单击右键查看效果.</p>
</body>
</html>
|
|
|
|
|
|