Bookmark links in Javascript

Insert a 'bookmark this page' link, or a 'set this page as start page'.

This page has two small javascript functions, one for adding a bookmark and one for setting the browser start page.

The addBookMark() function prints out a link to bookmark the page; that is: if the browser supports this function (Internet Explorer). In browsers that do not it prints out a small help text to aid in setting a bookmark.

The setStartPage() function prints out a link to set the current page as the browser start page; that is: if the browser supports this function (Internet Explorer). In browsers that do not, it is invisible.

Demo

Usage

See code below. Copy first, then paste. Optionally, edit.

Verbose instructions

First, place the script function(s) inside the <head> section of your html page. The script function(s) starts with "function" and ends with "}". Be sure to include the <script> tags before and after the function(s).

Then, to include the links in your html just insert one or both of these lines where you would like the links to appear:

<script type="text/javascript">addBookMark();</script>

<script type="text/javascript">setStartPage();</script>

That's all.

Source code

Version and License

Version and License

Version

Current version: 1

License

What? Free!