SEO TIPS

2013 SEO Tips

BLOGGER TIPS

Best Blogger Tips

INCREASE TRAFFIC

Expert Tips To increase traffic

ONLINE TOOLS

100 Online Tools

INCREASE INDEX RATE

Increase your google index rate

IMPROVE ALEXA RANK

Improve alexa rank

SEO TOOLS

51 SEO Tools

PHP SCRIPT

Essential PHP Scripts

Free javascript code:Forward and Back button

javascript code:Forward and Back button.Free download javascript code for webmasters so user can click on links for going back and forward.this javascript code provides buttons for going back and forward one of the most simple and easy to use javascript code for your website.

forward back button javascript

forward back button javascript



DESCRIPTION OF CODE:



(1)<FORM> 

<INPUT type="button" value="Click here to go back" onClick="history.back()"> 

</FORM>



This will place a button on your page that will send the user back to the last page in their history list before yours. To try it out, click the link below and see the button on the new page.





(1). <FORM>

It opens a form so we can use the button on the page.



(2). <INPUT type="button" value="Click here to go back".....

It creates the button we use for the script.



(3). ....onClick="history.back()">

 The onClick=" " tells the browser to do the command in the quotes when the button is clicked. The history.back()  takes the viewer one step back in their history list. 

1. history.forward()
This will take the viewer one step forward in their history list.

2. history.go(-1) or history.go(1)
This allows you to determine how far forward or back to take the viewer. Use a minus sign and a number to go back, or just a number to go forward. 
CODE STARTS
<!-- Start of Back/Forward Buttons Script--> <!-- Instructions: Just put this script anywhere on your webpage and you will give your visitor 2 Back and Forward Navigation buttons. Designed for websites that have multiple webpages. --> <SCRIPT LANGUAGE="JavaScript"> <!-- hide this script tag's contents from old browsers function goHist(a) { history.go(a); // Go back one. } //<!-- done hiding from old browsers --> </script> <FORM METHOD="post"> <INPUT TYPE="button" VALUE=" BACK " onClick="goHist(-1)"> <INPUT TYPE="button" VALUE="FORWARD" onClick="goHist(1)"> </form> <font face="Tahoma"><a target="_blank" href="http://www.blogspotinfo.com/2012/05/free-javascript-codeforward-and-back.html/"><span style="font-size: 8pt; text-decoration: none">Blogspotinfo</span></a></font> <!-- End of Back/Forward Buttons Script -->

0 comments :