I'd like that a specific link goes to a certain header on another page. I know how to do it on the current page.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
Create an anchor:
then link to it:
Take a look at anchor tags. You can create an anchor with
and refer to it later with
You can add hash info in next page url to move browser at specific position(any html element), after page is loaded.
This is can done in this way:
add hash in the url of next_page : example.com#hashkey
You simply combine the ideas of a link to another page, as with
href=foo.html
, and a link to an element on the same page, as withhref=#bar
, so that the fragment like#bar
is written immediately after the URL that refers to another page:The target is specified the same was as when linking inside one page, e.g.
or (if you really want to link specifically to a heading only)