<HTML>
<HEAD>
<title> Add to Favorites and settings home code Daquan </title>
<meta name= "GENERATOR" content= "Microsoft Visual Studio. NET 7.1" >
<meta name= "Code_language" content= "C #" >
<meta name= "vs_defaultClientScript" content= "JavaScript" >
<script language= "JavaScript" >
<!--//Add to Favorites code---------------------------------------------
function Bookmarkit ()
{
Window.external.addFavorite (' http://www.baidu.com/', ' Baidu ')
}
1. Popup When leaving the Web page
<body onunload= "Bookmarkit ()" >
2. Popup when webpage is loaded
<body >
3. Right-click Popup
Document.all.onmousedown=new Function ("if (event.button==2| | event.button==3) window.external.addFavorite (' http://www.baidu.com/', ' Baidu ') ')
4. Click the text pop-up
5. Mouse slide Over text popup
//----------------------------------------------------
Set as home code---------------------------
1. Popup Set as Home Page dialog code when closing Web page
<body id=iehomepage onunload= "iehomepage.style.behavior= ' url (#default #homepage) '; Iehomepage.ishomepage (' http://www.baidu.com/'))) iehomepage.sethomepage (' http://www.baidu.com/'); " >
2. Open Web page popup Set as Home Page dialog box code
<body id=iehomepage >
3. Click the link to set the home page
4. Mouse over set to homepage
-
</script>
</HEAD>
<body id= "Iehomepage" ms_positioning= "GridLayout" >
<form id= "Form1" method= "POST" runat= "Server" >
<a href= "#" > Add to Favorites </a><br>
<br>
<br>
<br>
<a href= "#" onmousemove= "Bookmarkit ()" > Mouse over Text pop-up favorites </a>
<br>
<br>
<br>
<br>
<a href= "#" >
Click the link to set home </a>
<br>
<br>
<br>
<br>
<a href= "#" onmousemove= "this.style.behavior= ' url (#default #homepage) '; This.sethomepage (' http://www.baidu.com/ ‘);" >
Mouse over settings for home </a>
</form>
</body>
</HTML>
Add to Favorites and settings home code Daquan