套打

来源:互联网 发布:白泽球 淘宝 编辑:程序博客网 时间:2024/03/29 17:36

       <input onclick = "print()" type = "button" value = "print打印"> <br>
       <iframe   id="print"  src= "02.jpg"  width = "500"   height = "300" style = "display:none"> </iframe>

 

 

function   print()
{  
 document.frames( "print").document.execCommand( "Print",   false);
}

 

 

--------------------------

<input onclick = "document.frames('print1').document.execCommand('print');" type = "button" value = "直接打印">


<iframe   id="print1"  name="print1"  src="/print.jsp?xh=<%=stuBean.xh %>" width = "0"   height = "0" style = "display:"> </iframe>

原创粉丝点击