Laibird introduces the window. print () method, window. print
Definition and usage of the print () method:
This method can generate a printing setting interface, which is the same as that generated by right-clicking the window and clicking the print option.
Syntax structure:
Window. print ()
Browser support:
1. Internet Explorer supports this attribute.
2. Firefox supports this attribute.
3. operabrowser supports this attribute.
4. chrome supports this attribute.
Code example:
<! DOCTYPE html>
The preceding Code Execution produces a printing setting interface that prints the current page.
Articles you may be interested in:
- Web print window. print ()
- Js window. print to print specific controls or content
- Window. print the code of the specified div instance
- Window. print: Specifies the method for printing a specified div in a specified area of a webpage.
- Javascript implements window. print () to remove the header and footer