尝试加载页面片段,或者至少跳转到 div 但没有乐趣。
<iframe src="http://myurl.com/#property_details" width="300" height="300">
</iframe>
但 iframe 不会跳到请求的 div,它只是加载整个页面,滚动到顶部。
尝试加载页面片段,或者至少跳转到 div 但没有乐趣。
<iframe src="http://myurl.com/#property_details" width="300" height="300">
</iframe>
但 iframe 不会跳到请求的 div,它只是加载整个页面,滚动到顶部。
不要认为它可以这样做。执行此操作的另一种可能性是使用通过 Ajax 调用将其内容设置为 #property_details 的 div。
这可能会有所帮助: http: //frinity.blogspot.com/2008/06/load-remote-content-into-div-element.html。在示例中,使用了页面的整个 html,但是可以通过在之前的数据上添加一些 jQuery 选择来选择您想要插入的内容。