HTML Set homepage/Add to Favorites code

Source: Internet
Author: User
Tags button type

(Special note: to replace ' this symbol without any input in the IME state of this symbol, or the program will not run)
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 homepage </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, you are automatically prompted to set the homepage:
<body onunload= "basebody.style.behavior= ' url (#default #homepage) '; Basebody.ishomepage (' http://www.1.com '))) basebody.sethomepage (' http://www.apple-wallpaper.comt '); " >

4.Open the page to indicate whether it is set as the home page:
<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> Homepage </u></a>




2. Text type:

<a onclick= "this.style.behavior= ' url (#default #homepage) ';

This.sethomepage (' http://www.apple-wallpaper.com '); "href=" # "> Set homepage </a>




3. Button Type:

<input type= "button" value= " set homepage " onclick= "this.style.behavior= ' url (#default #homepage) ';

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




4. automatically prompt for home page when leaving

<body onunload= "basebody.style.behavior= ' url (#default #homepage) ';

if (! ( Basebody.ishomepage (' http://www.apple-wallpaper.com '))) basebody.sethomepage (' http://www.apple-wallpaper.com/') ;" >





5. when the mouse pointer is set to the homepage

<a href= "http://www.apple-wallpaper.com/" onmouseover= "this.style.behavior= ' url (#default #homepage) ';

This.sethomepage (' http://www.apple-wallpaper.com '); "target=" _blank "> Set homepage </A>


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



Add to Favorite code

1.

<a href= "#" onclick= "Javascript:window.external.AddFavorite (' http://www.apple-wallpaper.com ', ' apple wallpaper Resources "Title=" collection site to your favorites "><font size="-1 "color=" #FFE09E "> favorite site </font></a>




2.

<a href= "javascript:void (0);" onclick= "Window.external.AddFavorite (document.location.href,document.title)" > Add to Favorites </a>




Join the Channel

<a href= "TYPHOON.CDF") > join Channel </a>




Mail link

<a href= "Mailto:[email protected" > contact me </a>

Then add the following code to <body> inside :

Onload= "Myhomepage ();"

namely:<body onload= "myhomepage ();" >


HTML Set homepage/Add to Favorites code

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.