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



Home Javascript JavaScript method AddFavourite()

Related Tutorials


 
 

Share on Google+Share on Google+

JavaScript method AddFavourite()

Advertisement
This section illustrates you the use of JavaScript method AddFavorite().

JavaScript method AddFavourite()

     

This section illustrates you the use of JavaScript method AddFavorite(). This method can be used in Internet Explorer to add a web address or a redirected page to the Internet Explorer favorites. It activates the Add to Favorites... function of Favorites menu in the Internet Explorer with the given URL. In the given example we have provided a URL to AddFavorite() method. This will add the specified URL to the Favorites menu of the Internet Explorer.

 

 

Here is the code:

<html>
<h2>Use of method AddFavourite()</h2>
<script>
function addFavourite(){
if (document.all){
window.external.AddFavorite("http://www.roseindia.net");
}
}
</script>
<body>
<a href="javascript:addFavourite()">Add Favorites</a>
</body>
</html>

Output will be displayed as:

On clicking the button, the following form will be displayed:

On clicking the 'ok' button, the specified URL gets added to the list of favorites:

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: October 7, 2010

Related Tutorials

Discuss: JavaScript method AddFavourite()  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:3
ali
August 16, 2011
alifd

<h1> hohoho <h1> var a; for(a=0;;a++) { document.write("good"); }
RATI RANJAN KAR
February 26, 2012
want how to develope a java script

java is amost vita branch of microsoft office. And is a operatable or application software.
Tusha kumar
March 22, 2012
How to cerete adventure work

adventure work
DMCA.com