3 Hide non-printing page elements and pagination CSS has a Media attribute that can set the printing and display formats separately. For example, The format in the middle will only work during printing and will not affect the display interface. So you can set
Then add: class="Noprint" to the page elements that you do not want to print, then they will not appear in printing and print preview. Add where you want to paginate: That's it. 4. Printing a specific part of the page This is achieved by creating a new page for the specific part that needs to be printed, then loading it into an IFrame on the main page, and then calling the print method of the IFrame to print only the content in the IFrame. For example:
The following springFrame js function will only print the content in the Iframe and can be directly referenced and used, such as printFrame(FrameId);
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