JS Add to Favorites in code
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<html xmlns= "http://www.jzread.com/1999/xhtml"
<head>
<meta http-equiv= " Content-type "content=" HTML; charset=gb2312 "/>
<title>js added to favorites in code </title>
<script language=" javascript "
// Add to Favorites
Function Addfavorite (site_url,site_name)
{
var the_pagetitle=site_name;
var the_ Pageurl=site_url;
if (the_pageurl== ")
{
the_pageurl=window.location.href;
}
if (the_pagetitle== "")
{
the_pagetitle=document.title
// Window.external.addFavorite (The_pageurl,the_pagetitle);
if (window.sidebar) {
window.sidebar.addpanel (The_pagetitle,the_pageurl, "");
} else if (document.all) {
//alert (window.external);
window.external.addfavorite (The_pageurl,the_pagetitle);
//window.external.addfavorite (' http://www.jzread.com ', ' My Site name ');
} else if (Window.opera && window.print) {
return true;
}
}
</script>
</head>
<body>
<a href= "javascript:void (0)" onclick= "Javascript:addfavorite (' http://www.jzread.com ') , "Construction station teaching network"); > Add to Favorites </a>
</body>
</html>