标签:os io ar div cti html on c new
<script> function myPrint(obj){ var newWindow=window.open("打印窗口","_blank");//打印窗口要换成页面的url var docStr = obj.innerHTML; newWindow.document.write(docStr); newWindow.document.close(); newWindow.print(); newWindow.close(); } </script> <div id="print"> <hr /> 打印演示区域,点击打印后会在新窗口加载这里的内容! <hr /> </div> <button onclick="myPrint(document.getElementById(‘print‘))">打 印</button>
标签:os io ar div cti html on c new
原文地址:http://www.cnblogs.com/kennyliu/p/3953437.html