H I O X INDIA
Javascript Tutorial
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Java-Script Tutorial
Introduction
Variables
Operators
Statements
Loops
Functions
Objects
Arrays
Browser Objects
Form DOM
Ask Your Doubts
Feedback





History Forward Page


Topic

forward function to go to next web page



Explanation

Methods or Function: forward()
        forward() function is used in javscript to go to the next page in the history list. This does the same function as of next button in the browser window.

Code: history.back();

Example: To create a button that takes to the next page when users click on it using javascript.
Code:
<script language="javascript">
function gonext(){
history.forward();
}
</script>
<input type=button value="go next" onClick=gonext()>

Result:
To test this go to next web page, come back and do the testing
In the above example
a) we created a button
b) added an onClick event listener to the button.
c) when user clicks on the button the javascript function gonext()
will be invoked.
d) in the gonext() function we call history.forward().




        Javascript (JS) is one of the most used languages in the world. Some times spelled as Java Script. Hope you enjoy this tutorial. Do send your feedback or suggestions on this javascript or java script tutorial. This is a copyright content.

others

privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Other Links