0

I do not want the button of print in the hard copy when printed.

<html>
    <head>
     <title>New Page 1</title>

    </head>
    <body>
     <p>
        This is just a paragraph fellas. I do not want the print button in the hard copy.
     </p>
    <input type="button" value="print" onclick="window.print()" />
    </body>
</html>

Also if there is a site which explains the proper use of how to print a hard copy of a particular section of a page, please provide the reference also. Thank you.

Goldensquare
  • 331
  • 3
  • 17

1 Answers1

1

Hide the print button with

this.style.display='none';

before printing.

<html>
    <head>
     <title>New Page 1</title>

    </head>
    <body>
     <p>
        This is just a paragraph fellas. I do not want the print button in the hard copy.
     </p>
    <input type="button" value="print" onclick="this.style.display='none';window.print();" />
    </body>
</html>
Jyothi Babu Araja
  • 10,076
  • 3
  • 31
  • 38