web print
Posted ®Geovin Du Dream Park™
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web print相关的知识,希望对你有一定的参考价值。
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>The HTML5 Herald</title> <meta name="description" content="The HTML5 Herald"> <meta name="author" content="SitePoint"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <meta name="description" content="Responsive HTML5 and CSS3 site templates designed by @ajlkn." /> <meta name="keywords" content="html5, css3, responsive, site template, website template" /> <meta name="apple-mobile-web-app-title" content="HTML5 UP" /> <style type="text/css" media="screen"> #divPrint { background-color:#ffffff; font-size:20px; } #tab { height:100px; width:400px; border:5px solid #000000; } .style1 { height: 50px; border:5px solid #000000; } </style> <script type="text/javascript"> function CallPrint(strid) { var prtContent = document.getElementById(strid); var WinPrint = window.open(‘‘, ‘‘, ‘letf=0,top=0,width=850,height=800,toolbar=0,scrollbars=1,status=0‘); WinPrint.document.write(‘<html><head><title>Popup 涂聚文</title>‘) //自定义标题 WinPrint.document.write(‘</head><body>‘); WinPrint.document.write(‘</body></html>‘); WinPrint.document.write(prtContent.innerHTML); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); //没有网址内容 } </script> </head> <body> <form id="form1" runat="server"> <input id="btnPrint" type="button" value="Print" runat="server" onclick="javascript:CallPrint(‘divPrint‘)"/> <div id="divPrint"> <table id="tab"> <tr id="tcss"> <td class="style1">Your controls </td> <td class="style1"> 打印的内容</td> </tr> <tr id="tcss"> <td class="style1">涂聚文<br /></td> <td class="style1">天下为公</td> </tr> </table> </div> </form> </body> </html>
https://www.codeproject.com/articles/24089/create-activex-in-net-step-by-step
以上是关于web print的主要内容,如果未能解决你的问题,请参考以下文章