Home > Web Front-end > JS Tutorial > body text

How to use hypertext tag in JS

零到壹度
Release: 2018-03-26 16:23:21
Original
2089 people have browsed it

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)还可以规定在本文档内跳转#等等
Copy after login

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:

Hypertext tag

##Hypertext tag

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template