One, what is a label
A label is one of the basic tags in HTML that defines a hyperlink to link to another page from one page. two, the href attribute
1, can link to the object of the document, can also link to the URL on the Web site;
<a href= "/index.html" > links to a page in this site </a>
<a href= "http://www.baidu.com/" > links to pages on the World Wide Web </a>
2, a label can use the text can also use the picture;
<a href= "/index.html" ></a>
<a href= "/index.html" > Text </a>
3, linked to the same page in different locations;
<a href= "#ID" > #ID是要跳转到位置标签的id </a>
Third, other properties
1, download: Downloaded hyperlink target. <a href= "/downloaded pictures. gif" download= "Download Pictures" > This is the download link </a>;
2. Target: The link is opened by: There are five options:
_blank: Opens the linked document in a new window.
_self: Default. Open the linked document in the same frame.
_parent: Opens the linked document in the parent frameset.
_top: Opens the linked document throughout the window.
FrameName: Opens the linked document in the specified frame.
Four: JS to achieve a label jump; do not use the HREF attribute to implement
1. With Parameter form
1) <a onclick= "test (Parameter ...);" >test</a>
2 Script code:
<script>
function test (obj) {
"Executed Code"
}
</script> 2 with no parameters
1) <a onclick= "test ();" >test</a>
2 Script code:
<script>
function Test () {
"Executed Code"
}
</script>