JavaScript

  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

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

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

JavaScript

  1. Home
  2. Computing & Technology
  3. JavaScript

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

All rights reserved.