Print a Web Page using Javascript

The print() method is used to print the contents of the current window. w=window.open(); w.document.write(document.getElementsByClassName(‘test’)[0].innerH‌​TML); w.print(); w.close(); Related topics: What is JavaScript? JavaScript advantages and disadvantages Javascript External file Javascript isNaN() Javascript Undefined and Null Javascript Create object JavaScript access cookie Javascript read cookie Javascript get cookie by name Javascript detete cookie Javascript redirect URL … Read more