你可以用window.open打开一个窗体用脚本使标题工具栏不显示来达到在求

解决方案 »

  1.   

    只是想用类似document.execcommand("print")的语句,来实现打印预览
      

  2.   

    在线HTML编辑器能否实现这样的功能呢?
      

  3.   

    testwb.htm<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>打印预览</title>
    </head>
    <script language="JavaScript" type="text/JavaScript">
    function openSrc(){
    var newwin = window.open(document.all.wb.src);
    newwin.test();
    newwin.close();
    }
    </script><body>
    <input type="button" name="Submit" value="预览" onClick="openSrc()">
    <iframe name="wb" src="test.htm"></iframe>
    </body>
    </html>test.htm<html>
    <head>
    <meta http-equiv="Content-Type" content="Application/msword">
    <title>test</title>
    </head>
    <script language="JavaScript" type="text/JavaScript">
    function test(){
    WebBrowser.ExecWB(7,1);
    }
    </script><body>aaaaaaa<object ID='WebBrowser' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>
    </body>
    </html>
      

  4.   

    我在2000+ie5下,结果是“该页无法显示”.会不会是IE版本问题,或者是那个“WebBrowser”对象的问题?
      

  5.   

    2000server + ie6.0 乔麦的代码能实现iframe中页面的打印预览。