Add to favorites
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> webpage special effects | www.jscode.cn | --- add to favorites </title>
</Head>
<Body>
Right-click to view code
<P> code 1: <a onclick = "window. external. addFavorite (location. href, document. title); "Title =" webpage effects "style =" cursor: Hand "> Add this page to favorites </a> </P>
<P> <br>
Code 2: <a href = "javascript: window. External. AddFavorite ('HTTP: // www.jscode.cn ', 'webpage effect exclusive')"> Add to favorites </a>
</P>
<P>
<Script language = "JavaScript">
Function AddFavorite (URL, title ){
VaR fav_url = URL;
VaR fav_title = title;
If (document. All & window. External ){
Window. External. AddFavorite (fav_url, fav_title );
} Else if (window. Sidebar ){
Window. Sidebar. addpanel (fav_title, fav_url ,"");
} Else {
Alert ("not supported by browsers, please manually add to Favorites ");
}
}
</SCRIPT>
Code 3: <a href = "javascript: AddFavorite ('HTTP: // www.html.org.cn ', 'website title');"> Add to favorites </a>
</P>
</Body>
</Html>
Set the default homepage
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> webpage effects | www.jscode.cn | --- set the default homepage </title>
</Head>
<Body>
Right-click to view code
<P> code 1: <span onclick = "Var strhref = Window. location. href; this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.jscode.cn '); "style =" cursor: Hand "> set this site as the homepage </a> </span> </P>
<P> <br>
Code 2: <a Title = "set this site as the browser Homepage" onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.jscode.cn '); "href =" javascript:; "> set as homepage </a>
</P>
</Body>
</Html>