<script>
function PrintArticle() {
var pc = document.getElementById("PrintContent");//打印内容容器
var pw = window.open();
pw.document.write('<html>');
pw.document.write('<head>');
pw.document.write('<title>页面打印</title>');
pw.document.write('<style>');
pw.document.write('.table03{ width:100%; line-height:40px; font-size:14px; margin-top:20px;}');
pw.document.write('.table03 span{ float:right;}');
pw.document.write('.table03 i{ color:red; margin-left:10px;}');
pw.document.write('.table03 td{ padding:0 10px;}');
pw.document.write('.yp_txt{ height:30px; line-height:30px; width:250px;}');
pw.document.write('.table03 table{ width:100%;}');
pw.document.write('.yp_tar{ height:150px;}');
pw.document.write('.btn_table{ margin-top:30px; text-align:center;}');
pw.document.write('.btn_table a{ margin:0px 20px;}');
pw.document.write('textarea {width: 88%;padding: 2px;line-height: 16px;overflow: auto;}');
pw.document.write('</style>');
pw.document.write('</head>');
pw.document.write('<body>');
pw.document.write(pc.innerHTML);
pw.document.write('</body>');
pw.document.write('</html>');
pw.document.close();
setTimeout(function () {
pw.print();
}, 500);
return false;
}
</script>
js页面打印
最新推荐文章于 2024-05-22 15:07:14 发布