Add to Bookmark Link using JS


<script language="javascript" type="text/javascript">
function addBookmark()
{
    bookmarkurl = document.URL;
    bookmarktitle = document.title;
    if (document.all)  //Check the condition for IE
        window.external.AddFavorite(bookmarkurl, bookmarktitle)
    else if (window.sidebar) // Check the condition for Mozilla
   {
       window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
   }
}
</script>

<a href="javascript:addBookmark();">Bookmark this page!</a>

Comments