<script language="JavaScript">
var whatsNew = open('','_blank','top=50,left=50,width=200,height=300,' +
                'menubar=no,toolbar=no,directories=no,location=no,' +
                'status=no,resizable=no,scrollbars=yes');
whatsNew.document.write('<center><b>HOHO</b></center>');
whatsNew.document.write('<p>哈哈');
whatsNew.document.write('<p>TEST');
whatsNew.document.write('<p align="right">' +
                '<a href="javascript:self.close()">关闭窗口</a>');
whatsNew.document.close();</script>哈哈后面要要引号关闭

解决方案 »

  1.   

    <script language="JavaScript">
    var whatsNew = window.open('','_blank','top=50,left=50,width=200,height=300,' +
                    'menubar=no,toolbar=no,directories=no,location=no,' +
                    'status=no,resizable=no,scrollbars=yes');
    whatsNew.document.write('<center><b>HOHO</b></center>');
    whatsNew.document.write('<p>哈哈');
    whatsNew.document.write('<p>TEST');
    whatsNew.document.write('<p align="right">' +
                    '<a href="javascript:self.close()">关闭窗口</a>');
    whatsNew.document.close();</script>
      

  2.   

    高人,问题在于whatsNew根本不是新窗口的对象,你改的我也试了,还是同样问题。能帮我再看看么,谢谢:)
      

  3.   

    用var whatsNew = window.open()
    做不到
      

  4.   

    var whatsNew = window.open('所要显示的文件名','_blank','top=50,left=
    50,width=200,height=300,' +
                    'menubar=no,toolbar=no,directories=no,location=no,' +
                    'status=no,resizable=no,scrollbars=yes');
      

  5.   

    如何得到子窗口的窗口对象呢,MSDN上说是可以得到的,但是却没例子谁能详细解释一下,我可以再加分
      

  6.   

    你打开的子窗口的名字,
    通过名字来调用子窗口,
    如:WIN1.DOCUMENT.ALL("")
    WIN1为子窗口听名字.