function window.onload()
{
window.resizeto(800,600);
}

解决方案 »

  1.   

    <script language="JavaScript">
    <!--
    function fxwin(){window.resizeTo(800,600);}
    window.onload=fxwin;
    window.onresize=fxwin;
    //-->
    </script>
      

  2.   

    楼上的方法只实现了指定窗口大小,但没有固定,用户还是能改变大小的。如果只是个别窗口的话,可以用
    window.open('aa.htm','','width=800,height=600,resizable=no')
    不知道有没有对当前窗口的resizable属性,没找到。
      

  3.   

    城市刀客提前我一分钟发了,那就是楼上的楼上了。onresize的时候再执行一次,呵呵,不错。 
      

  4.   

    <div id="message104487" class="t_msgfont"><br><textarea id="code1" rows="10" cols="95">&lt;table id=a&gt;&lt;tr&gt;&lt;td&gt;你好可爱&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#13&lt;script&gt;&#13DivTag=document.createElement(&quot;div&quot;);&#13DivTag.id=&quot;b&quot;;&#13DivTag.innerText=&quot;xxxxxxxxxxxxxx&quot;&#13a.insertAdjacentElement(&quot;beforeBegin&quot;,DivTag)&#13&#13&lt;/script&gt;</textarea><br><input type="button" value="运行代码" onclick="runCode($('code1'))">&nbsp;<input type="button" value="复制代码" onclick="copyCode($('code1'))">&nbsp;<input type="button" value="另存代码" onclick="saveCode($('code1'))">&nbsp;提示:您可以先修改部分代码再运行<br /><br /></div>