Home  >  Article  >  Web Front-end  >  js window.print implements printing specific controls or content_javascript skills

js window.print implements printing specific controls or content_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:22:251342browse

window.print can print web pages, but sometimes we only want to print specific controls or content. What should we do?

window.print prints the specified div
First we can put the content to be printed in the div, and then use the following code to print.

Copy code The code is as follows: