document.frames[框架名].window.focus();
document.frames[框架名].window.print();

解决方案 »

  1.   

    to vivianfdlpw() 
    就是想达到在一页纸里面,把所有的框架打印出来。
      

  2.   

    window.top.print();//按屏幕所列布局打印
    window.top.frames["frame1"].print();仅打印frame1for(i=0;i<window.top.frames.length;i++)
    {
    window.top.frames[i].print();//逐个打印所有框架
    }
      

  3.   

    谢谢
    window.top.print();//按屏幕所列布局打印
    我试验了,并不是 “按屏幕所列布局打印“,而是 “逐个打印所有框架“
      

  4.   

    <OBJECT  id=WebBrowser  classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2  height=0  width=0 VIEWASTEXT>
      </OBJECT>
    <input type=button value=打印     onclick="document.all.WebBrowser.ExecWB(6,1)" class="NOPRINT">
    <input type=button value=直接打印 onclick="document.all.WebBrowser.ExecWB(6,6)" class="NOPRINT">
    <input type=button value=页面设置 onclick="document.all.WebBrowser.ExecWB(8,1)" class="NOPRINT">
    <input type=button value=打印预览 onclick="document.all.WebBrowser.ExecWB(7,1)" class="NOPRINT">