Home »
MCQs »
JavaScript MCQs
What is the use of this JavaScript statement?
16. What is the use of this JavaScript statement?
<button onclick="window.print()">Submit</button>
- It will write "Submit" on the current Window
- It will print the content of the current page
- It will write the content of the current page in the browser’s console
- None of the above
Answer: B) It will print the content of the current page
Explanation:
The window.print() method prints the content of the current page.