国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

js 單擊式的下拉菜單效果實例

2024-05-06 15:50:30
字體:
來源:轉載
供稿:網友
這篇文章介紹了js 單擊式的下拉菜單效果實例,有需要的朋友可以參考一下

復制代碼 代碼如下:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>js 單擊式的下拉菜單效果</title>
<style>
.div1 { width: 120px; height: 20px; line-height:20px; text-align:center; }
.div2 {width: 120px; position:absolute; left:0; top:10px;visibility:hidden; }
.div2 a{ display:block;}
</style>
</head>
<body>
<script language="JavaScript">
var zindex=100
function dropit2(whichone){
if (window.themenu&&themenu.id!=whichone.id)
themenu.style.visibility="hidden"
themenu=whichone
if (document.all){
themenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX
themenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (themenu.style.visibility=="hidden"){
themenu.style.visibility="visible"
themenu.style.zIndex=zindex++}
else{
hidemenu()}}}
function dropit(e,whichone){
if (window.themenu&&themenu.id!=eval(whichone).id)
themenu.visibility="hide"
themenu=eval(whichone)
if (themenu.visibility=="hide")
themenu.visibility="show"
else
themenu.visibility="hide"
themenu.zIndex++
themenu.left=e.pageX-e.layerX
themenu.top=e.pageY-e.layerY+19
return false}
function hidemenu(whichone){
if (window.themenu)
themenu.style.visibility="hidden"}
function hidemenu2(){
themenu.visibility="hide"}
if (document.all)
document.onclick=hidemenu
</script>
<span> <a href="###">[點擊顯示菜單]</a> </span>
<div>
<a href="http://m.survivalescaperooms.com">腳本之家</a>

<a href="#">個性名字網</a>
<a href="#">個性名字網</a>
</div>
</body>
</html> </td>
   </tr>
 </table>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 武汉市| 青海省| 新兴县| 德格县| 寿光市| 仙游县| 花垣县| 洮南市| 鄯善县| 房产| 娄烦县| 曲靖市| 宁河县| 上高县| 社会| 宜兰县| 法库县| 连云港市| 油尖旺区| 太仓市| 阿拉善左旗| 清苑县| 乐亭县| 印江| 天气| 重庆市| 东乡县| 曲麻莱县| 罗定市| 唐山市| 讷河市| 昌宁县| 九龙城区| 井陉县| 宁海县| 慈利县| 永顺县| 南京市| 池州市| 清苑县| 安化县|