| 项目搜索 |
| |
|
代码片段库:
查看代码片段
浏览
| 提交新的代码片段
| 创建代码包
左键弹出式菜单
|
类型:
Full Script |
类别:
HTML Manipulation
|
许可证:
GNU General Public License |
语言:
JavaScript
|
描述:
左键弹出式菜单[推荐]
|
该代码片段的版本系列:
片段ID |
下载版本 |
提交时间 |
提交人 |
删除 |
4606 | 1.0 | 2003-10-13 21:34 | cbd001 | |
点击"下载版本"来下载该代码片段.
最新版本的代码片段: 1.0
左键弹出式菜单[推荐][修改显示的文字及链接即可][共2步]
====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>
如果您修改了一个代码片段并且觉得很应该让别人共享,您可以把这作为这个代码片段的最新版本提交上来. |
|