Set Home Page & favorite websites

Source: Internet
Author: User
When you close a webpage, the "set as Homepage" dialog box is displayed. Code :
<Body id = iehomepage
OnUnload = "iehomepage. style. Behavior = 'url (# default # homepage) '; If (! (Iehomepage. ishomepage ('HTTP: // www.xqsheng.cn ') iehomepage. setHomePage ('HTTP: // www.xqsheng.cn'); ">

The code of the "set as Homepage" dialog box is displayed:
<Body id = iehomepage
Onload = "iehomepage. style. Behavior = 'url (# default # homepage) '; If (! (Iehomepage. ishomepage ('HTTP: // www.xqsheng.cn ') iehomepage. setHomePage ('HTTP: // www.xqsheng.cn'); ">

Click link to set as home page
<A href = # onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.xqsheng.cn '); "> set as home page </a>

Move the mouse over the Home Page
<A href = # onmouseover = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.xqsheng.cn '); "> set as home page </a>

Code for adding to favorites:

Pop up when you leave the webpage
<Script language = "JavaScript">
Function bookmarkit () {window. External. AddFavorite ('HTTP: // www.xqsheng.cn ', 'xqsheng blog')} </SCRIPT>
<Body onUnload = "bookmarkit ()">

Page pop-up when loading
<Script language = "JavaScript">
Function bookmarkit () {window. External. AddFavorite ('HTTP: // www.xqsheng.cn ', 'xqsheng blog ')}/
</SCRIPT>
<Body onload = "bookmarkit ()">

Right-click
<Script language = javascript1.2>
Document. all. onmousedown = new function ("If (event. button = 2 | event. button = 3) window. external. addFavorite ('HTTP: // www.xqsheng.cn ', 'xqsheng blog ')")/
</SCRIPT>

Click Text
<Script language = "JavaScript">
Function bookmarkit () {window. External. AddFavorite ('HTTP: // www.xqsheng.cn ', 'xqsheng blog ')}/
If (document. All) document. Write ('<a href = "#" onclick = "bookmarkit ()"> Add to favorites </a> ')
</SCRIPT>

move the mouse over the text to bring up

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.