Home > Article > Web Front-end > How to use hypertext tag in JS
This time I will bring you the special use of the tag in JS. What are the precautions for the special use of the tag in JS? The following is a practical case. Let’s take a look. .
Usage of hypertext tag a tag:
1)download filename specifies the hyperlink target to be downloaded.
2)href URL specifies the URL of the page to which the link points.
2.1)跳转的连接,www.baidu.com. 2.2)javascript:void(0),不跳转相当于关闭了a标签的功能. 2.3)javascript:函数,相当点击标签执行函数,和onclick相似了. 2.4)还可以规定在本文档内跳转#等等
3)name section_name is not supported in HTML5. Specifies the name of the anchor.
4)rel text specifies the relationship between the current document and the linked document.
5)target _blank/_parent/_self/_top/framename The location of the open document specifies where to open the linked document.
6)type MIME type specifies the MIME type of the linked document.
Related recommendations:
The above is the detailed content of How to use hypertext tag in JS. For more information, please follow other related articles on the PHP Chinese website!