Add to Favorites and settings home code Daquan

Source: Internet
Author: User

<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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.