标签:javascript
<pre name="code" class="html"><pre name="code" class="html">window.moveTo(x,y)参数说明。
window.resizeTo(x,y)参数说明如下。
window.resizeBy(x,y)参数说明如下。
<html> <head> <meta charset="utf-8" /> <title>弹出的窗口</title> <style type="text/css"> body{ background-image:url(new.jpg); background-repeat:no-repeat; } </style> </head> <body> </body> </html>(2)实现功能的主窗口index.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title></title> <script type="text/javascript"> var winheight,winsize,x,win2; function go1() { winheight = 100; winsize = 100; x = 5; win2 = window.open("new.html","","scrollbars='no'"); win2.moveTo(0.0); win2.resizeTo(100,100); go2(); } function go2() { if (winheight>=screen.avaiHeight-3) { x=0; } win2.resizeBy(5,x); winheight+=5 winsize+=5; if(winsize>=screen.width-5) { winheight=100; winsize=100; x=5; return; } setTimeout("go2()",50); } </script> </head> <body> <a href="javascript:go1()">打开</a> </body> </html>
标签:javascript
原文地址:http://blog.csdn.net/yejinwei1220/article/details/45868823