The method for setting as homepage is:
<A href = # onClick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // www.djasp.net '); event. returnValue = false; "> set as homepage </a>
The http://www.djasp.net is the URL of the home page you want to set.
The content you view comes from the design of www. djasp. Net.
Click design, Professional WEB programming information site. Welcome to visit!
This content is generated randomly. Do not turn around the webmaster. Please remember the domain name you clicked to design: www. djasp. net you are visiting site theft click design resources, please close this page, then visit the design of the official site: http://www.djasp.net
If you want to set the current webpage address as the homepage, you can use the following method:
<A href = # onClick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage (document. location. href); event. returnValue = false; "> set as homepage </a>
The preceding method uses the href attribute of the document. location object in javascript to obtain the full path of the current webpage.
The content you view is reprinted from★Click Design★Www. djasp. Net
Click design is a professional web programming information site. Welcome to visit!
It is shameful to steal the content of the site, you view the site without clicking design permit, a large number of theft click design site content, please close the site and then visit the design of the official site: http://www.djasp.net/
Similarly, if you only want to set the domain name address of the current webpage as the homepage, you only need to change document. Location. href to document. Location. Host. Example:
<A href = # onclick = "this. style. behavior = 'url (# default # homepage) '; this. setHomePage (document. location. host); event. returnvalue = false; "> set as homepage </a>
(If the current page address is: http://www.djasp.net/standard/read.asp? Id = 27, the domain name address (www.djasp.net) of the current webpage is set as the homepage.
This content consists:★Click Design★Www. djasp. net.
Click design, Professional WEB programming information site. Welcome to sit down !)
Please remember to click design domain name: www. djasp. net, this site contains a large number of WEB programming tutorials, boring people will inevitably reprint this article, please visit the design of the official site: http://www.djasp.net/
To add to favorites, follow these steps:
<A href = "javascript: window. External. AddFavorite ('HTTP: // www.djasp.net ', click design')"> Add to favorites </a>
Similar to the above method, if you want to add the current web page to favorites, but the current web page is not sure, you can use the following method:
<A href = "javascript: window. External. AddFavorite (document. Location. href, document. Title)"> Add to favorites </a>
The document. title indicates the JavaScript code that automatically obtains the title of the current webpage.