本帖最后由 c755731262 于 2015-10-12 03:01 编辑
- <html>
- <body>
- <script>
- var x=10;
- var y=window.screen.availHeight;
- var dx=5;
- var newFrm=window.open("","newForm","menubar=0,toolbar=0");
- newFrm.resizeTo(x,y);
- var intervalID=window.setInterval("active()",100);
-
- function active()
- {
- if(newFrm.closed)
- {
- clearInterval(intervalID);
- return;
- }
-
- if(x<screen.availWidth)
- x+=dx;
- else
- {
- clearInterval(intervalID);
- }
- newFrm.resizeTo(x,y);
-
- }
- </script>
- <input type="button" value="stop" onclick="clearInterval(intervalID);newFrm.close();">
- </body>
- </html>
复制代码
|