什么是空链接?
就是没有目标端点的链接。
格式如下:
1
|
<a href= "#" >显示内容</a> |
(推荐教程:html入门教程)
作用:
1、设为首页
1
|
<a href= "#" onclick= "this.style.behavior=&#39;url(#default#homepage)&#39;;this.sethomepage(&#39;https://www.jb51.net&#39;)" >设为首页</a> |
2.添加收藏
1
|
<a href= "#" onclick= "Javascript:window.external.addfavorite(&#39;https://www.jb51.net&#39;,&#39;搜狐&#39;)" >加入收藏夹</a> |