1. Home
  2. Computing & Technology
  3. JavaScript

Add to Favorites

Join the Discussion

Questions? Comments?

Only Internet Explorer allows you to create a link that your visitors can use to automatically add your page to their favorites. With other browsers all you can do is to put a message on the page reminding them which key combination to press.

The first step in using this script is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called favlink.js.

You then attach the script into your web page in the body section of your page where you want the link or message to appear using the following code:

<script type="text/javascript" src="favlink.js">
</script>
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.