Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

版权申明
查看: 4689|回复: 0

想实现JS弹出层,没有玩转,怎么回事?

[复制链接]

该用户从未签到

发表于 2010-1-26 16:47:57 | 显示全部楼层 |阅读模式
  1. <html>
  2. <head>
  3.   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4.   <meta http-equiv="cache-control" content="no-cache, must-revalidate">
  5.   <title>英泰客户服务管理系统 管理中心</title>
  6. <style>
  7. body {margin:0px}
  8. #Loading {position:absolute;z-index:10;left:10px;top:10px;border:1px #666666 solid;background:#eeeeee;width:10px;height:10px}
  9. </style>
  10. <script LANGUAGE="JavaScript">
  11. <!--
  12. function $(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);}
  13. var OverH,OverW,ChangeDesc,ChangeH=50,ChangeW=50;
  14. function OpenDiv(_Dw,_Dh,_Desc) {
  15. $("Loading").innerHTML="";
  16. OverH=_Dh;OverW=_Dw;ChangeDesc=_Desc;
  17. $("Loading").style.display='';
  18. if(_Dw>_Dh){ChangeH=Math.ceil((_Dh-10)/((_Dw-10)/50))}else if(_Dw<_Dh){ChangeW=Math.ceil((_Dw-10)/((_Dh-10)/50))}
  19. $("Loading").style.top=(document.documentElement.clientHeight-10)/2+"px";
  20. $("Loading").style.left=(document.documentElement.clientWidth-10)/2+"px";
  21. OpenNow()
  22. }
  23. var Nw=10,Nh=10;
  24. function OpenNow() {
  25. if (Nw>OverW-ChangeW)ChangeW=2;
  26. if (Nh>OverH-ChangeH)ChangeH=2;
  27. Nw=Nw+ChangeW;Nh=Nh+ChangeH;
  28. if(OverW>Nw||OverH>Nh) {
  29. if(OverW>Nw) {
  30. $("Loading").style.width=Nw+"px";
  31. $("Loading").style.left=(document.documentElement.clientWidth-Nw)/2+"px";
  32. }
  33. if(OverH>Nh) {
  34. $("Loading").style.height=Nh+"px";
  35. $("Loading").style.top=(document.documentElement.clientHeight-Nh)/2+"px"
  36. }
  37. window.setTimeout("OpenNow()",10)
  38. }else{
  39. Nw=10;Nh=10;ChangeH=50;ChangeW=50;
  40. $("Loading").innerHTML=ChangeDesc;
  41. }
  42. }
  43. //-->
  44. </script>
  45. </head>
  46. <frameset name="mainFrame" rows="67,600*" cols="*" frameborder="NO" border="0"
  47.   framespacing="0">
  48.   <!-- 页面头部 -->
  49.   <frame src="head.html" name="topFrame" frameborder="no" scrolling="NO"
  50.    noresize marginwidth="0" marginheight="0">
  51.   <frameset cols="171,836*" frameborder="NO" border="0" framespacing="0"
  52.    rows="*" name="workaround">
  53.    <frameset rows="20,*" cols="*" framespacing="0" frameborder="NO"
  54.     border="0">
  55.     <!-- 菜单标题 -->
  56.     <frame src="hidden_left_frame.html" name="topFrame1"
  57.      frameborder="no" scrolling="no" noresize>
  58.     <!-- 菜单 -->
  59.     <frame name="leftFrame" noresize scrolling="NO" src="menu.html"
  60.      frameborder="no" scrolling="no" marginwidth="0" marginheight="0">
  61.    <frame src="parameter.html"></frameset>
  62.    <frameset rows="40,*" cols="*" framespacing="0" frameborder="no"
  63.     border="0">
  64.     <!-- 工具栏 -->
  65.     <frame src="toolbar.php" name="toolBar" frameborder="no"
  66.      scrolling="no" noresize marginwidth="0" marginheight="0"
  67.      id="toolBar">
  68.     <!--
  69.          <frameset rows="*,50" cols="*" framespacing="0" frameborder="NO" border="0" >
  70.          -->
  71.          <!-- 主体 -->
  72.     <frame name="main" src="templates/menu_view/site_map.html" marginWidth=0 scrolling="Yes"
  73.      marginheight="0"   noresize>
  74.     <!--
  75.           <frame src="statusbar.html" name="bottomFrame" scrolling="NO" noresize>
  76.          </frameset>
  77.     -->
  78.    </frameset>
  79.   </frameset>
  80. </frameset>
  81. <noframes>
  82.   <body bgcolor="#FFFFFF" onload="OpenDiv(500,300,'层1<br>双击关闭')">
  83.   <div id="Loading" style="display:none" ondblclick="this.style.display='none'"></div>
  84.   </body>
  85. </noframes>
  86. </html>
复制代码
回复

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-3 01:27 , Processed in 0.055434 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表