<html><head>
<script type = "text/javascript">
window.onload = function(){
window.resizeBy(40,40);
}
</script>
</head><body>
</body></html>运行window.moveBy(10,20);也是没反应,我用的chrome,都是照着书打的,都没信心学下去了。。

解决方案 »

  1.   

    要对新弹出的窗口才有效原网页
    <html>
    <head>
     </head>
    <body>
        <input id="Button" type="button" value="open" 
         onclick="alert('hi');window.open('poped.htm','d','width=600px,height=400px;');"
         />
    </body>
    </html>
    被弹出的网页
    <html>
    <head>
    <script type = "text/javascript">
        window.onload = function() {
            alert("load");
            window.resizeBy(240, 240);
        }
    </script>
    </head>
    <body>
    poped page
    </body>
    </html>你可以清楚的看到,弹出的网页原来的宽高600x400,alert 后调整为240X240了