Share on Google+Share on Google+

JavaScript method AddFavourite()

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:

<h2>Use of method AddFavourite()</h2>
function addFavourite(){
if (document.all){
<a href="javascript:addFavourite()">Add Favorites</a>

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




Posted on: October 7, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

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.

Discuss: JavaScript method AddFavourite()  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
August 16, 2011

<h1> hohoho <h1> var a; for(a=0;;a++) { document.write("good"); }
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