开发者

Link to site with scroll (included)

开发者 https://www.devze.com 2023-01-21 09:07 出处:网络
Hi is there way to actually link to any site (not your own). And when clicked it takes you to that site + x amount of code.

Hi is there way to actually link to any site (not your own). And when clicked it takes you to that site + x amount of code.

Of course I am not talking about the pages which all ready have a jQuery 开发者_开发百科plugin or something, I am talking include the paramater of "scroll" (or what ever) already from my site or link.

I guess the answer could be that there isn´t any way but I hope there is a way to "tell the browser" follow that and then scroll this much...

I hope the question is clear enough, if not please ask for any clarifications needed!

Thanks in advance!

Trufa


No, there's no way to control the browser scrolling through the window generically via a URL unless the web page itself supports it.

The most common way to support it is the anchor tags, to which you can the link directly in the form of http://your-server/your/url.html#tag_name. The HTML page in question would then define the scroll point by declarintg the anchor via <A name="tag_name">.

As per robertc's comment, modern browsers also support using element IDs as tag names in this manner - but again, you need the target HTML document to have an element with an ID placed in the desired scroll point. It works on my FireFox 3.6.10 - to test on your browser, go to Link to site with scroll (included) and see if it scrolls down to the start of the answers.

You could also approach this by building a browser extension (e.g. FireFox Add-On) which would allow scrolling down upon a link for any web page, but this would then only work for users who have that specific browser with that specific extension installed.

0

精彩评论

暂无评论...
验证码 换一张
取 消