Html <a href="#">点击此处</a>是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5788873/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 08:13:41  来源:igfitidea点击:

What does <a href="#">Click here</a> mean?

html

提问by Unknown

What does <a href="#">Click here</a>mean?

什么<a href="#">Click here</a>意思?

回答by Quentin

It means "Render a hyperlink that takes the visitor to the top of the page and label it with the, distinctly uninformative, text Click here"

它的意思是“呈现一个超链接,将访问者带到页面顶部并用明显无信息的文本标记它点击这里

回答by CloudyMarble

<a  href="#Bookmark1" target="frame1">
  Link text that leads to Bookmark1 in the current document
</a>

<a  href="http://www.foo.com/index.html#Bookmark1" target="frame1">
  Link text that leads to Bookmark1 in index.html at www.foo.com
</a>

If no Bookmark is specified in the HREF statement, the browser will default to the top of the document.

如果在 HREF 语句中未指定书签,则浏览器将默认为文档顶部。

From Hyperlink [A Href]

来自超链接 [A Href]

回答by Kdeveloper

The # of the link Click hereis link to the top of the current page. But these kind of #links are often also used for links that are generated by JavaScript. With modern JavaScript library like YUIand JQueryit is no longer needed to explicitly add an "onClick" attribute to the html, see for example the JQUery API: click.

链接的# Click here链接到当前页面的顶部。但是这些#链接通常也用于由 JavaScript 生成的链接。对于像YUIJQuery这样的现代 JavaScript 库,不再需要向html显式添加“ onClick”属性,例如参见 JQUEry API:click