<html>
<title>test</title>
<head></head>
<body>
<script>
<!-- 
function windowopen()
{
var target="/MedicineQry.dll/search?RT=&MS= 西林"
newwindow=window.open("","","scrollbars")
if (document.all)
{
newwindow.moveTo(0,0)
newwindow.resizeTo(600,400) 
}
newwindow.location=target
}
windowopen();
 //-->
</script> 
</body> 
</html>

解决方案 »

  1.   

    <html>
    <title>test</title>
    <head></head>
    <body onload='document.all.button1.click();'>
    <script>
    <!-- 
    function windowopen()
    {
    var target="/MedicineQry.dll/search?RT=&MS= 西林"
    newwindow=window.open("","","scrollbars")
    if (document.all)
    {
    newwindow.moveTo(0,0)
    newwindow.resizeTo(600,400) 
    }
    newwindow.location=target
    }
     //-->
    </script> 
    <form >
    <input type="button" onClick="windowopen()" value="全屏显示" name="button1">
    </form>
    </body> 
    </html>
      

  2.   

    出现错误:行 13错误:newwindow不是对象 
    代码:0
      

  3.   

    <html>
    <title>test</title>
    <head></head>
    <body onload="windowopen();">
    <script>
    <!-- 
    function windowopen()
    {
    var target="/MedicineQry.dll/search?RT=&MS= 西林"
    newwindow=window.open("","","scrollbars")
    if (document.all)
    {
    newwindow.moveTo(0,0)
    newwindow.resizeTo(600,400) 
    }
    newwindow.location=target
    }
     //-->
    </script> 
    <form >
    <input type="button" onClick="windowopen()" value="全屏显示" name="button1">
    </form>
    </body> 
    </html>
      

  4.   

    我IE6下测试可以,可能版本问题!用下面的看看
    <html>
    <title>test</title>
    <head></head>
    <body>
    <script>
    <!-- 
    function windowopen()
    {
    var target="/MedicineQry.dll/search?RT=&MS= 西林"
    target="http://www.liaoba.com"
    newwindow=window.open(target,"","left=0,top=0,width=600,height=400,scrollbars=yes,resizable=no;")
    }
    windowopen();
     //-->
    </script> 
    </body> 
    </html>
      

  5.   

    <html>
    <title>test</title>
    <head></head>
    <body onload="javascript:frmDisplay.btnOpen.click()">
    <script>
    <!-- 
    function windowopen()
    {
    var target="/MedicineQry.dll/search?RT=&MS= 西林"
    newwindow=window.open("","","scrollbars")
    if (document.all)
    {
    newwindow.moveTo(0,0)
    newwindow.resizeTo(600,400) 
    }
    newwindow.location=target
    }
     //-->
    </script> 
    <form id="frmDisplay">
    <input type="button" onClick="windowopen()" value="全屏显示" name="button" id="btnOpen">
    </form>
    </body> 
    </html>
      

  6.   

    用onload事件<body onload="windowopen()">
      

  7.   

    谢谢各位,不过
    新問題出現:
    我在上述 处理的结果上 加上了 window.close ,这样 我本来的 网页就能关闭,然后弹出我 自己的另外窗口, 可是 原有网页 总是 一闪 然后才关闭,我不想 让它闪,只想 让它 默默无闻 地 打开 弹出窗口,可否实现?
      

  8.   

    首先button不要取name叫button,可能会找不对对象的,
      buttonid.click()方法可以fire对象的onclick事件。