Is there a way to link to the middle of another page, even if they don’t have an anchor?

... something like telling the browser what percentage of the page is in the center?

+5
source share
3 answers

Yes, you can. If a person has an element with an identifier anywhere on the page. For instance:

<div id="someId"></div>

Then you can create a link to this page, for example:

<a href="http://somePage.com#someId">Middle!</a>

The only thing you need to do is select Id in the middle.

+12
source

No, you cannot do this without bindings. You will need to access the DOM to do scrollTo or something similar, which is prohibited in different domains. The main reason is security.

0
source

{ Google Chrome; remeber wiki , URL- , - !}

1_ URL-:

https://en.wikipedia.org/wiki/RSA_(cryptosystem)

2_ " "

3_ " " → " " → " HTML"

4_ :

<span class="mw-headline" id="A_worked_example">A worked example</span>

5_ id = "A_worked_example" . :

<a href="http://somePage.com#someId">Middle!</a>:

<a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)#A_worked_example">Middle!</a>

6_ :

https://en.wikipedia.org/wiki/RSA_(cryptosystem)#A_worked_example

:)

0

All Articles