网站首页 | 文章中心 | 源码中心 | 虚拟主机 | 域名注册 |  贺卡源码 | Java特效 |
您现在的位置: 人文中国 >> 文章中心 >> javascript >> 文章正文

  没有公告

左键弹出式菜单[推荐]     ★★★★★ 【字体:
左键弹出式菜单[推荐]
作者:人文在线    文章来源:本站原创    点击数:    更新时间:2004-6-21

====1、将以下代码加入HEML的<head></head>之间:

<style type="text/css">
body{font: 9pt "宋体"; margintop: 0px ; color: #ffffff; background: #000000}
a.{ font: 9pt "宋体"; cursor: hand; font-size: 9pt ; color: #ffffff; text-decoration: none }
a:active{ font: 9pt "宋体"; cursor: hand; color: #FF0033 }
a.cc:hover{ font: 9pt "宋体"; cursor: hand; color: #FF0033}
.box{ font: 9pt "宋体"; position: absolute; background: #000000 }
</style>

====2、将以下代码加入到HEML的<body></body>之间:

<table id="itemopen" class="box" style="display:none">
<tr>
<td>弹出菜单</td>
</tr>
<tr>
<td><a href="../../../index.html" class="cc">本站首页</a></td>
</tr>
<tr>
<td><a href="../../navigation/newscript.htm" class="cc">最新更新</a></td>
</tr>
<tr>
<td><a href="../../navigation/applet/appletindex.htm" class="cc">梦想软件</a></td>
</tr>
<tr>
<td><a href="../../../jsschool/index.htm" class="cc">桌面壁纸</a></td>
</tr>
<tr>
<td><a href="popmenu.htm" class="cc">更多连接</a></td>
</tr>
<tr>
<td><a href="popmenu.htm" class="cc">更多连接</a></td>
</tr>
<tr>
<td><a href="popmenu.htm" class="cc">更多连接</a></td>
</tr>
</table>
</center></div><!-- End of Popup Menu -->
<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>


文章录入:renwen@renwen.net    责任编辑:renwen@renwen.net 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    一款特效javascript菜单
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)