Links in the page in addition to the normal way, if you use JavaScript, there are many ways, here are some ways to use JavaScript, open the link:
1. Open the link using the window's Open method, which opens the link in the development page, and can also customize the size of the open page, and so on.
<a href= "Javascript:window.open (' http://www.jb51.net ', ' _self ')" > Open a link 1</a><br/>
2. Use of document. URL property to call the new page. Not enough of this approach seems to be ineffective in Firefox.
<a href= "Javascript:document. URL = ' http://www.jb51.net ' > Open a link 2</a><br/>
3. Use Location's property href to open the link.
<a href= "javascript:window.location.href= ' http://www.jb51.net '" > Open a link 3 </a><br/>
4. Use the location method assign to open the link, this effect is the same as in the previous way.
<a href= "javascript:window.location.assign (' http://www.jb51.net ')" > Open a link 4</a><br/>
5. Using the location method replace to open the link is slightly different from the previous assign method, except that the URL of the page that is substituted when you use replace will not go into the history object. That means you can't go back to the page you're replacing.
<a href= "Javascript:window.location.replace (' http://www.jb51.net ')" > Open a link 5</a><br/>
6. Normal links, of course, this is the most friendly way to search engines, you can also do the specified link open window. Only in this way can the linked pages be crawled by search engine spiders.
<a href= "Http://www.jb51.net" > Open a link 5</a><br/>
The above JavaScript to achieve the opening of the link page is a simple example of the small series to share all the content, hope to give you a reference, but also hope that we support the cloud habitat community.