写的一个用弹出窗口隐藏连续showModalDialog刷新的测试页面

阅读更多
主页面
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script language="JavaScript">
<!--
   var subWin;
   function testModel(){
     subWin = window.open("ac.htm","","width=280,height=140,top=310,left=360,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
     for(var i=0;i<50;i++){
       window.showModalDialog("ab.htm",'ab',"status:no;resizable:yes;dialogHeight:100px;dialogWidth:150px;unadorne:yes");
//    setTimeout("writeText()",5000);
}

   }
   function closeModel(){
     subWin.close();
   }
//-->
</script>
</head>
<body>
   <input type="button" value="测试模式" onclick="testModel()">
   <input type="button" value="关闭模式" onclick="closeModel()">
</body>
</html>
附页面1:
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body bgcolor="#c9d3f3">

<div id="eMeng" style="BORDER-LEFT: #a6b4cf 5px solid; BORDER-RIGHT: #a6b4cf 5px solid; BORDER-TOP: #a6b4cf 5px solid; BORDER-BOTTOM: #a6b4cf 5px solid; LEFT: 0px; TOP: 0px; WIDTH: 250px; HEIGHT: 45px; POSITION: absolute; Z-INDEX: 99999; BACKGROUND-COLOR: #c9d3f3">
正在处理数据,请稍候......
<marquee style="border:1px solid #000000" direction="right" width="250" scrollamount="5" scrolldelay="10" bgcolor="#ECF2FF">
<table cellspacing="1" cellpadding="0">
<tr height="18">
<td bgcolor="#3399FF" width="8"></td>
<td></td>
<td bgcolor="#3399FF" width="8"></td>
</tr>
</table>
</marquee>
</div>
<script>
var chasm = document.body.clientWidth;
var mount = document.body.clientHeight;
var h = parseInt(document.getElementById("eMeng").offsetHeight,10) ;
var w = parseInt(document.getElementById("eMeng").offsetWidth,10) ;
document.getElementById("eMeng").style.top =(mount-h)*.5;
document.getElementById("eMeng").style.left = (chasm-w)*.5;
</script>
</body>
</html>
附页面2:
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script language="JavaScript">
<!--
  window.close();
//-->
</script>
</head>

<body>
<input type="button" value="tottadf">
</body>
</html>

你可能感兴趣的:(360,JavaScript,HTML)