任意位置显示导航信息 无论你在什么地方点击左键,导航菜单都会自动跳出来,非常实用
第一步:把如下代码加入<head>区域中:
<style type="text/css"> <!--
body { font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR:black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋体"; cursor: hand; color: #FF0033 }
a.cc:hover { font: 9pt "宋体"; cursor: hand; color: #FF0033}
.box { font: 9pt "宋体"; position: absolute; background: #fef4d9 }
--> </style>
第二步:把如下代码加入<body>区域中
<SCRIPT language=javascript> <!--
document.onclick = popUp
function popUp() {
newX = window.event.x + document.body.scrollLeft
newY = window.event.y + document.body.scrollTop
menu = document.all.itemopen
if ( menu.style.display == ""){
menu.style.display = "none" }
else {
menu.style.display = ""}
menu.style.pixelLeft = newX - 50
menu.style.pixelTop = newY - 50
} //--> </SCRIPT> <!-- Start of Popup Menu --> <table id="itemopen" class='box' style='display:none'>
<tr><td><a href='index.htm' class="cc" >弹出菜单</a></td></tr>
<tr><td><a href='http://wwwdna.yeah.net' class="cc" >本站首页</a></td></tr>
<tr><td><a href='http://webid.126.com' class="cc">经典网址</a></td></tr>
<tr><td><a href='http://edna.126.com' class="cc" >网上赚钱</a></td></tr>
<tr><td><a href='emaildna.126.com' class="cc" >免费资源</a></td></tr>
<tr><td><a href='http://wwwdna.yeah.net' class="cc" >网络教程</a></td></tr>
<tr><td><a href='http://webid.126.com' class="cc" >精彩网址</a></td></tr>
<tr><td><a href='http://eskill.126.com' class="cc" >网页技巧</a></td></tr>
</table> <!-- End of Popup Menu -->
<style type="text/css"> <!--
body { font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR:black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋体"; cursor: hand; color: #FF0033 }
a.cc:hover { font: 9pt "宋体"; cursor: hand; color: #FF0033}
.box { font: 9pt "宋体"; position: absolute; background: #fef4d9 }
--> </style>
第二步:把如下代码加入<body>区域中
<SCRIPT language=javascript> <!--
document.onclick = popUp
function popUp() {
newX = window.event.x + document.body.scrollLeft
newY = window.event.y + document.body.scrollTop
menu = document.all.itemopen
if ( menu.style.display == ""){
menu.style.display = "none" }
else {
menu.style.display = ""}
menu.style.pixelLeft = newX - 50
menu.style.pixelTop = newY - 50
} //--> </SCRIPT> <!-- Start of Popup Menu --> <table id="itemopen" class='box' style='display:none'>
<tr><td><a href='index.htm' class="cc" >弹出菜单</a></td></tr>
<tr><td><a href='http://wwwdna.yeah.net' class="cc" >本站首页</a></td></tr>
<tr><td><a href='http://webid.126.com' class="cc">经典网址</a></td></tr>
<tr><td><a href='http://edna.126.com' class="cc" >网上赚钱</a></td></tr>
<tr><td><a href='emaildna.126.com' class="cc" >免费资源</a></td></tr>
<tr><td><a href='http://wwwdna.yeah.net' class="cc" >网络教程</a></td></tr>
<tr><td><a href='http://webid.126.com' class="cc" >精彩网址</a></td></tr>
<tr><td><a href='http://eskill.126.com' class="cc" >网页技巧</a></td></tr>
</table> <!-- End of Popup Menu -->