Set as homepage/Add to favorites code

Source: Internet
Author: User

1. Text Type:
<A onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.apple-wallpaper.com '); "href =" http://www.apple-wallpaper.com "> set to home </a>

2. Button type:
<Input type = "button" value = "set as Homepage" onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.apple-wallpaper.com '); "href =" http://www.apple-wallpaper.comt ">

3. When you leave, the system automatically prompts you to set it to the homepage:
<Body onUnload = "basebody. style. Behavior = 'url (# default # homepage) '; If (! (Basebody. ishomepage ('HTTP: // www.1.com ') basebody. setHomePage ('HTTP: // www. apple-wallpaper.comt'); ">

4. When the webpage is opened, the system prompts whether the page is set as the homepage:
<Script language = "JavaScript">
Function myhomepage (){
This. Homepage. style. Behavior = 'url (# default # homepage) '; this. Homepage. setHomePage ('HTTP: // www.dafacai.net ');
}
</SCRIPT>
<P align = "center"> <a href = "http://www.apple-wallpaper.comt" name = "Homepage"
Onclick = "myhomepage ();"> </a>

 

 

1. Image Link

<A style = "cursor: Hand" onclick = "This. style. Behavior = 'url (# default # homepage )';

This. setHomePage ('HTTP: // www.apple-wallpaper.com '); ">

<U> set as homepage </u> </a>

 

2. Text Type:

<A onclick = "This. style. Behavior = 'url (# default # homepage )';

This. setHomePage ('HTTP: // www.apple-wallpaper.com '); "href =" # "> set to homepage </a>

 

3. Button type:

<Input type = "button" value = "set to homepage" onclick = "This. style. Behavior = 'url (# default # homepage )';

This. setHomePage ('HTTP: // www.apple-wallpaper.com '); "href =" # ">

 

4. When you leave, the system automatically prompts you to set it to the homepage.

<Body onUnload = "basebody. style. Behavior = 'url (# default # homepage )';

If (! (Basebody. ishomepage ('HTTP: // www.apple-wallpaper.com ') basebody. setHomePage ('HTTP: // www.apple-wallpaper.com/'); ">

 

 

5. Set the prompt to homepage when the cursor points

<A href = "http://www.apple-wallpaper.com/" onmouseover = "This. style. Behavior = 'url (# default # homepage )';

This. setHomePage ('HTTP: // www.apple-wallpaper.com '); "target =" _ blank "> set to homepage </a>

-------------------------------------------------------------------------------

 

Add to favorites code

1.

<A href = "#" onclick = "javascript: window. external. addFavorite ('HTTP: // www.apple-wallpaper.com ', 'apple wallpaper resource ') "Title =" add this site to your favorites "> <font size ="-1 "color =" # ffe09e "> Add this site to favorites </font> </a>

 

2.

<A href = "javascript: void (0);" onclick = "window. External. AddFavorite (document. Location. href, document. Title)"> Add to favorites </a>

 

Add Channel

<A href = "Typhoon. CDF")> Add to channel </a>

 

Email Link

<A href = "mailto: xuan_web@hotmail.com"> contact me </a>

 

Add the following code to <body>:

Onload = "myhomepage ();"

That is: <body onload = "myhomepage ();">

 

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.