Home  >  Article  >  Web Front-end  >  js control paging printing, print paging example_javascript skills

js control paging printing, print paging example_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:01:131488browse
Copy code The code is as follows:

<%@ page language="java" contentType="text/ html; charset=UTF-8"
pageEncoding="UTF-8"%>



javascript printing-print page settings-print preview code</ TITLE> <br><META http-equiv=Content-Type content="text/html; charset=gb2312" /> <br><style media=print> <br>.Noprint{display:none;} <br>.PageNext{page-break-after: always;} <br></style> <br><SCRIPT language=javascript> <br> function printsetup(){ <br> //Print page setup<br> wb.execwb(8,1); <br>} <br> function printpreview(){ <br> // Print page preview <br> wb.execwb(7,1); <br>} <br> function printit() <br> { <br> if (confirm('Are you sure to print?')) { <br> wb.execwb(6,6) <br> } <br> } <br></SCRIPT> ; <br><br><script type="text/javascript" src="/js/jquery.3.5.2.min.m.js"></script> </HEAD> <br><BODY> <br><br><DIV align=center> <br><OBJECT id=wb height=0 width=0 <BR> classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 name=wb></OBJECT> <br><INPUT onclick=javascript:printit() type=button value=print name=button_print /> <br> <INPUT onclick=javascript:printsetup(); type=button value=Print page setup name=button_setup /> <br><INPUT onclick=javascript:printpreview(); type=button value=Print preview name=button_show / > <br></DIV> <br>111</br> <br>111</br> <br>111</br> <br><div class="PageNext"></ div> <br>222</br> <br>222</br> <br>222</br> <br><div class="PageNext"></div> <br>333</ br> <br>333</br> <br>333</br> <br><div class="PageNext"></div> <br>444</br> <br>444</ br> <br>444</br> <br><div class="PageNext"></div> <br>555</br> <br>555</br> <br>555</ br> <br></BODY> <br></HTML> <br> </div> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="95557" class="copybut" id="copybut95557" onclick="doCopy('code95557')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code95557"> <br><html> <br><title>JS 分页批量打印解决方案(只支持IE)












以下为打印区:









第一页的内容
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111




第二页内容
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111



第三页内容

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn