Javascript: Print Page button

here’s a very simple javascript to place a link on a webpage to facilitate the user’s printing of that page:

simply paste the code below where you want the button to appear:

<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
if (window.print) {
document.write(‘<form>Click Here To ‘
+ ‘<input type=button name=print value=”Print” ‘
+ ‘onClick=”javascript:window.print()”> This Page!</form>’);
}
// End –>
</script>

Tags:

Leave a Reply

You must be logged in to post a comment.