HOW TO ADD BACK AND FORWARD / PRINT JAVASCRIPT BUTTONS ON YOUR WEB SITE PAGES?

Create active javascript Print This Page or Back / Forward Buttons on your web page with beautiful CSS layouts. Use the code and insert the same in the HTML page where you want them to appear. View the sample how they would look below.


1] BUTTONS WITH COLOR AND STYLE
Use the following code in your html document for creating the BACK, FORWORD and PRINT THIS PAGE button. Note: You can control the Buttons color and fonts etc by editing the Style tags within the Code.

EXAMPLE:




SOURCECODE:

1
2
3
4
<FORM>
<INPUT TYPE="button" VALUE=" BACK " onClick="history.go(-1)" style="font-family:verdana;color:#FFFFFF;background-color:blue;font-size:11px;">
<INPUT TYPE="button" VALUE="FORWARD" onfiltered="history.go(1)" style="font-family:verdana;color:#FFFFFF;background-color:green;font-size:11px;">
<INPUT TYPE="button" VALUE="Print this page" onClick="window.print()" style="font-family:verdana;color:#FFFFFF;background-color:orange;font-size:11px;">

2] SIMPLE BUTTONS
Use the following code to insert plain back button on the web page. Change the URL’s to your own.

EXAMPLE:





SOURCECODE:

1
2
3
4
5
6
<FORM> 
<input type="button" value="Home" onClick="document.location.href='http://trustmeher.com/';"> 
<INPUT TYPE="button" VALUE="Freewares" onClick="document.location.href='http://google.com/';" > 
<INPUT TYPE="button" VALUE="Print" onClick="window.print()" > 
<INPUT TYPE="button" VALUE="Back" onClick="history.go(-1)" > 
</FORM>

3] BUTTON ON CLICK WITH HYPERLINK TO ANOTHER PAGE

Use the following script to create Buttons with link to open another page.

EXAMPLE:

SOURCECODE:

1
<input type="button" value="Click Here" onClick="document.location.href='my-file.htm';">

or

1
<input type="button" value="Google" onClick="document.location.href='http://google.com';">

Web Hosting domain name registration Free Software Tools Download