Home Javascript How to go back to the previous page using JavaScript?
 
 
 

How to go back to the previous page using JavaScript?

PDF Print E-mail

Question: How to go back to the previous page using JavaScript?

 

Answer:

By using the JavaScript code history.go(-1);

In our example we will show you how to use it in a anchor tag.

<a href="javascript:history.go(-1);">Back</a>

 

+/-
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!