wmlJava 发表于 2013-2-7 15:13:51

IEWebBrowser 分页打印 (HTML分页打印)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>    <title>print.html</title>    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">    <meta http-equiv="description" content="this is my page">    <meta http-equiv="content-type" content="text/html; charset=UTF-8">      <!--<link rel="stylesheet" type="text/css" href="./styles.css">--><style media="print"><!--.Noprint{display:none;}.PageNext{page-break-after:always;}--></style><style type="text/css"><!--.STYLE1 {font-size: 12px}--></style></head>    <body>    <object id="WebBrowser" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>第一页的内容<br><br><br><div class="Noprint">打印不显示的内容<br><br><br></div><div class="PageNext"></div>第二页的内容<br><br><br>      <div class="Noprint">    <input type=button value=打印预览 class="button"onclick=document.all.WebBrowser.ExecWB(7,1) >   <input type=button value=打印 class="button"onclick=document.all.WebBrowser.ExecWB(6,1) >    </div>   </body></html> 
页: [1]
查看完整版本: IEWebBrowser 分页打印 (HTML分页打印)