By 18/02/2014 1 Comments

How to create back button using Javascript

Back button in Javascript

  • In javascript it is very simple to go back on previous page when click on back button
  • javascript has a built in function which named as go.
  • That function called by history object which is an built in browser’s object

Here is the code for create back button using javascript.

Javascript Code snippet

<script type="text/javascript">

        function Goback() { // create function
            history.go(-1); // call go function (it is an browser's builtin object)
        }

    </script>

HTML Code Snippet

<form>

        <input type="button" value="GoBack" onclick="Goback();" /> <!-- crate a button and call Goback() function --->

    </form>






Posted in: HTML, JavaScript

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .