Home >Web Front-end >JS Tutorial >js calls iframe to implement the method of printing page content_jquery
1. Program description
1) This program can select an area on the page to print and print in iframe mode;
2) The difference from the original print() is that it cancels printing The content of the currently visited page can be completely retained after the page.
2. Code part
1) JS function:
2) HTML:
Click the print button on the page to test printing;
In addition to the above method, we can also use jquery to implement the example. The code is as follows:
If you want to achieve area printing, we can try the following method
The following article shares a super simple method to realize the printing function of the page. It can not only print the entire page, but also print a certain area of the page