用户点击链接后弹出图层显示,有几种格式的图层选择,当在图层上面双击鼠标即可实现图层关闭效果。
<html> <head> <meta http-equiv="content-Type" content="text/html;charset=gb2312"> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>点击弹出图层双击鼠标立即关闭效果_武鸣人</title> <style type="text/css"> body {margin:0px} #wuming_ren {position:absolute;z-index:1;left:20px;top:80px;border:1px #666666 solid;background:#9611EE;width:10px;height:10px} </style> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <script language="javascript"> <!-- function $(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);} var OverH,OverW,ChangeDesc,ChangeH=50,ChangeW=50; var _DW,_DH function setSize(){ temW=_DW<10?document.body.scrollWidth:document.documentElement.offsetWidth;//_DW<10 即层宽满屏 temH=_DH<10?document.body.scrollHeight:document.documentElement.offsetHeight;//_DH<10 即层高满屏 OverH=_DH<10?temH:_DH; OverW=_DW<10?temW:_DW; if(OverW>temH){ChangeH=Math.ceil((temH-10)/((OverW-10)/50))}else if(OverW<temH){ChangeW=Math.ceil((OverW-10)/((temH-10)/50))} temW=_DW<10?0:(temW-_DW)/2;//(层宽度>窗口宽度时 层左=0,否则居中) temH=_DH<10?0:(temH-_DH)/2;//(层高度>窗口高度时 层顶=0,否则居中) $("wuming_ren").style.top=temH+"px"; $("wuming_ren").style.left=temW+"px"; $("wuming_ren").style.display=''; OpenNow() }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function OpenDiv(_Dw,_Dh,_Desc) { _DH=_Dh _DW=_Dw ChangeDesc=_Desc; closeNow(); setSize() }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) var Nw=10,Nh=10; function OpenNow() { if (Nw>OverW-ChangeW)ChangeW=2; if (Nh>OverH-ChangeH)ChangeH=2; Nw=Nw+ChangeW;Nh=Nh+ChangeH; if(OverW>Nw||OverH>Nh) { if(OverW>Nw) { $("wuming_ren").style.width=Nw+"px"; //$("wuming_ren").style.left=(document.documentElement.clientWidth-Nw)/2+"px"; } if(OverH>Nh) { $("wuming_ren").style.height=Nh+"px"; //$("wuming_ren").style.top=(document.documentElement.clientHeight-Nh)/2+"px" } window.setTimeout("OpenNow()",10) } else{ Nw=10;Nh=10;ChangeH=50;ChangeW=50; $("wuming_ren").innerHTML=ChangeDesc; } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function closeNow(){ $("wuming_ren").innerHTML=""; $("wuming_ren").style.display='none'; $("wuming_ren").style.top=0; $("wuming_ren").style.left=0; $("wuming_ren").style.width=0; $("wuming_ren").style.height=0; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) //--> </script> <!--a href="javascript:OpenDiv(宽<10则宽满屏,高<10则高满屏,'层内容')"--> <a href="javascript:OpenDiv(9,500,'武鸣人一号<br>双击关闭')">一号层</a> 9*500 <a href="javascript:OpenDiv(10,500,'武鸣人二号<br>双击关闭')">二号层</a> 10*500 <a href="javascript:OpenDiv(500,9,'武鸣人三号<br>双击关闭')">三号层</a> 500*9 <a href="javascript:OpenDiv(500,10,'武鸣人四号<br>双击关闭')">四号层</a> 500*10 <a href="javascript:OpenDiv(9,9,'武鸣人五号<br>双击关闭')">五号层</a> 9*9 <div id="wuming_ren" style="color:#fff;display:none" ondblclick="closeNow()"></div> <div style="height:900px"></div> </body> </html>
本文来自武鸣人网站,转载请注明出处