"Anchor Point"

Source: Internet
Author: User

First Jump: (Jump on the same page, use name to locate)

Use the Name property only for the a tag, and other tags such as div cannot be positioned

<AHref= "#q1"> Problem one?</A><AHref= "#q2"> Question two?</A><AHref= "#q3"> Problem three?</A><Aname= "Q1" > question one Span style= "color: #0000ff;" ></a> <a name= "Q2" > question two answers </a<a name= "Q3" > answer to question three a>       

Second jump: (Jump on the same page, use ID to locate)

Other labels can be positioned using the id attribute

<ahref= "#q1">Question one?</a><ahref= "#q2">Question two?</a><ahref= "#q3">Question three?</a><Pname= "Q1">Answer to question one</P> <Divname= "Q2">Answer to question two</Div> <H1name= "Q3">Answer to question three</H1>

The third type of Jump: (Cross-page jump, use name or ID to locate)

<href= "b.html#q1"> problem one? </ a >  <name= "Q1"> answer to question one </A  >

The fourth kind of jump: (Define the anchor point, use JS to jump)

        location.hash= "#html"  ;     </script>

"Anchor Point"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.