Skip to content
Advertisement

How to print selected div instead complete page

I have two divs: div1 and div2.

Maintaining the original css styles applied to the div2 element being printed.

I don’t want to print content inside div1 but only the inside of div2.

How to print?

Advertisement

Answer

Try this

JavaScript
Advertisement