Simple Example of JS printer calling function

Source: Internet
Author: User
A simple example of JS printer call function this article describes how JS calls the printer function. We will share this with you for your reference. The details are as follows:

 <! -- {$ AListData. name} --> admission ticketScript function preview (response) {if (Response <10leading missing bdhtml###doc ument. body. innerHTML; // gets the html code sprnstr ="
 "; // Set eprnstr ="
 "; // Set the print end area prnhtml = bdhtml. substring (bdhtml. indexOf (sprnstr) + 18); // obtain htmlprnhtml = prnhtml from the start code. substring (0, prnhtml. indexOf (eprnstr); // obtain html?document.body.innerhtml=prnhtml###print({windowindow.doc ument. body. innerHTML = bdhtml;} else {window. print () ;}} script
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: 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.