首页 > Web开发 > 详细

web print

时间:2017-08-23 14:37:35      阅读:361      评论:0      收藏:0      [点我收藏+]
<!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

原文:http://www.cnblogs.com/geovindu/p/7417652.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!