如何移动到外部页面的特定部分 [英] How to move to specific section of external page

查看:30
本文介绍了如何移动到外部页面的特定部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上打开一个新标签后,我想将焦点移到外部网站页面的底部.这样做的原因是我真正想显示的项目在页面底部(实际上是一些搜索结果).

After opening a new tab on my site, I want to move the focus to the bottom of the page on the external site. The reason for this is that the item I really want to show is at the bottom of the page (which is actually some search results).

这是目前的链接:

<a href="http://www.approvedworkshops.co.uk/search/map/wales/#results" target="_blank">NCC Approved</a>

我想强调'Cymru Caravan &Trailer Services',这是列表中的最后一项.

and I want to highlight 'Cymru Caravan & Trailer Services' which is the last item in the list.

非常感谢所有帮助.

谢谢迈克

推荐答案

一般来说,无法链接到外部页面的底部,也无法突出显示其上的任何项目.JavaScript 解决方法也不行,因为它们无法从外部域访问页面.

Generally speaking, it is not possible to link to the bottom of an external page, nor to highlight any items on it. JavaScript workarounds are out of the question as well, because they can't access pages from external domains.

不过,在您的情况下,您可以使用一种笨拙的解决方法并跳转到页面底部 ID 为footer"的元素:

In your case, though, you could use a kuldgy workaround and jump to the element with the ID "footer" which is at the bottom of the page:

http://www.approvedworkshops.co.uk/search/map/wales/#footer

这是您无需先将整个页面提取到您的服务器上就能做到的最佳方式.

this is the best you will be able to do without fetching the whole page onto your server first.

这篇关于如何移动到外部页面的特定部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆