Javascript paging printing code

Source: Internet
Author: User
<HTML> <title> JS paging batch printing solution (ie only) </title> <script language = "JavaScript"> function printwithalert () {document. all. webbrowser. execwb (6, 1);} function printwithoutalert () {document. all. webbrowser. execwb (6, 6);} function printsetup () {document. all. webbrowser. execwb (8, 1);} function printprieview () {document. all. webbrowser. execwb (7,1);} function printimmediately () {document. all. webbrowser. execwb (6, 6); window. close () ;}</SCRIPT> <Object ID = webbrowser classid = CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2 style = "display: none "> </Object> </NoScript> <style media = print>. noprint {display: none ;}. pagenext {page-break-after: Always ;} </style> <Table align = "center" class = noprint> <tr> <TD align = "center"> <button Title = print onclick = printwithalert ()> print </button> <button Title = print onclick = printwithoutalert ()> Print </button> <input type = button value = "Print Settings" onclick = "printsetup () "> <button onclick = 'printprieview () 'Title = 'print preview... '> print preview </button> </TD> </tr> </table> <Div class = noprint> The following is the print area: <br> </div> <HR size = 1 noshadow color = black class = noprint> <Table class = "pagenext"> <tr> <TD colspan = 2> first page data </TD> </tr> <TD> User Name </TD> <TD> address </TD> </tr> <TD> Zhang San </ TD> <TD> Beijing </TD> </tr> </table> <HR size = 1 noshadow color = black class = noprint> <Div class = "pagenext"> second page data </div> <HR size = 1 noshadow color = black class = noprint> third page data
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.