How Make Bookmark with Link
You'll often find links like "Bookmark this site", which if we click the link it will directly go into the Favorites. By entering the site to your Favorites, then we no longer need to bother typing in the site name in Address Bar, but simply by clicking a website listed in your Favorites list.
To create a bookmark link, enter the following code between the tags <HEAD> and </ HEAD> on your web page:
You'll often find links like "Bookmark this site", which if we click the link it will directly go into the Favorites. By entering the site to your Favorites, then we no longer need to bother typing in the site name in Address Bar, but simply by clicking a website listed in your Favorites list.
To create a bookmark link, enter the following code between the tags <HEAD> and </ HEAD> on your web page:
<script language="JavaScript1.2">
<!--Start
var bookmarkurl = "http://tophtml.blogspot.com/"
var bookmarktitle = "HTML Tutorial and Tips"
addbookmark function () {if
(Document.all) window.external.AddFavorite (bookmarkurl, bookmarktitle)}
/ / End-->
</script>
After that we can create links that will "call" javascript code above:
<script language="JavaScript">
if (document.all) document.write ('<a
href = "javascript: addbookmark ()"> Bookmark This Site! </ a> ')
</script>
Please remember that the code above is only for Internet Explorer browser. What if the users are using Netscape Navigator? Just use the script below:
<script Language="JavaScript">
<!--Begin
if (document.all) {/ /
var url = "http://tophtml.blogspot.com";
var title = "HTML Tutorial and Tips";
document.write('<A HREF="javascript:window.ext');
document.write('ernal.AddFavorite(url,title);" ');
document.write('onMouseOver=" window.status=');
document.write("'Bookmark Now!'; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">Bookmark This Site</a>');
}
else {
document.write("Bookmark This Site (CTRL+D)");
}
/ / End-->
</script>
How Make Bookmark with Link
0 comments:
Post a Comment