HTML & CSS Snippets

Name:Bookmark Page
Description: Let visitors bookmark your website using a link.

Code below...
<!-- Put the Javascript code between your header tags -->
<script type="text/javascript">

  //Change this value
  var url = "http://www.mywebsite.com";
  var desc = "mywebsite.com - Best website ever!";
  var message = "Press CTRL+D to bookmark this page.";

  function bookmark() {
    if (navigator.appName=='Microsoft Internet Explorer') {
      window.external.AddFavorite(url,desc)
    }
    else if (navigator.appName=='Netscape') { 
      alert(message);
    }
  }
</script>

<!-- Example -->
<a href="javascript:bookmark()">Bookmark this page</a>

« Back to HTML & CSS Snippets

Home | Site Map | Privacy Policy | Advertising | Contact Us
Copyright © 2006-2014 r2xDesign.net - All Rights Reserved.
eXTReMe Tracker