Home >Web Front-end >HTML Tutorial >What is the use of empty links in html

What is the use of empty links in html

王林
王林forward
2020-04-02 15:31:514805browse

What is the use of empty links in html

What is an empty link?

is a link without a target endpoint.

The format is as follows:

<a href="#">显示内容</a>

(Recommended tutorial: html introductory tutorial)

Function:

1. Set as homepage

<a href="#"
onclick="this.style.behavior=&#39;url(#default#homepage)&#39;;this.sethomepage(&#39;https://www.jb51.net&#39;)">设为首页</a>

2. Add favorites

<a href="#"
onclick="javascript:window.external.addfavorite(&#39;https://www.jb51.net&#39;,&#39;搜狐&#39;)">加入收藏夹</a>

Recommended related video tutorials: html video tutorial

The above is the detailed content of What is the use of empty links in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete