Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Javascript JavaScript navigate method

Related Tutorials


 
 

Share on Google+Share on Google+

JavaScript navigate method

Advertisement
In the JavaScript we have navigate() method which can help users to navigate to the various locations.

JavaScript navigate method

     

In the JavaScript we have navigate() method which can help users to navigate to the various locations. We can make beautiful applications by using the method navigate like the photo gallery and many more which are based on the navigation.  

 

 

 

 

 

Syntax

 window.navigate("specified_location");

where specified_location is the URL to which the page should navigate.

Description of code:

In this section of JavaScript method we will describe you that how you can use the navigate method into your web page's html code. We have created a button "Navigate" when this button is clicked then it calls the method funcNavigate() which navigates to the specified URL "http://www.roseindia.net". Given below is the full source code for navigation example :

<html>
<body>
  <script language="JavaScript">
  function funcNavigate() {
  window.navigate("http://www.roseindia.net");
  }
  </script>
 <div align="center">
 <center>
  <table border="0" width="45%" bgcolor="#800080">
   <tr>
   <td width="100%" align="center">
  <p align="center"><font face="Comic Sans MS" size="7" color="#FFFFFF">
   navigate method</font></td>
  </tr>
   </table>
 </center>
 </div>
   <center>
  <p>Click to navigate RoseIndia Home</p>
   </center>
  <p align="center">
  <input type="button" value="Navigate" onclick="funcNavigate();">
   </p>
</body>
</html>

Output :

When user clicks on the button navigate this page navigates user to another web page www.roseindia.net

Download Source Code

     

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 29, 2009

Related Tutorials

Discuss: JavaScript navigate method  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com