Add to favorites script

August 10, 2008 by admin  
Filed under JavaScript

This is an add to favorites JavaScript example. This example shows the actual script and usage in a simple HTML page

<html>
<head>
<title></title>
<script language=”JavaScript1.2″>

//change the two variables below
var bookmarkurl=”http://www.yoursitehere.com”;
var bookmarktitle=”name of site here”;

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

</script>
</head>
<body>
<a href=”javascript:addbookmark()”>Bookmark this site!</a>

</body>
</html>

Related posts:

  1. status bar digital clock This is a JavaScript example that will display a clock...
  2. Lottery number generator This example will generate random numbers which you could use...
  3. Capitalize letters using CSS This example shows how to use CSS to capitalize letters....
  4. Add to de.licio.us This will allow a user to bookmark a page on...
  5. Random XML feeds with PHP This example will display results from random XML feeds, note...

Related posts brought to you by Yet Another Related Posts Plugin.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!