跳转到框架集框架中的#anchor

发布于 2024-09-30 16:16:06 字数 192 浏览 7 评论 0原文

我的框架集中有 3 个帧,在重新加载一帧后,我想将其他帧之一跳到特定的锚点。

有谁知道该怎么做?

我目前已经有了这个 javascript,但它似乎不起作用(LEFT_FRAME_ID 已经设置):

parent.frames[parent.LEFT_FRAME_ID].hash="#100";

谢谢!

I've got 3 frames in a frameset, and after one frame has reloaded I want to jump one of the other frames down to a particular anchor.

Does anyone know how to do that?

I've currently got this javascript but it doesn't seem to work (LEFT_FRAME_ID has already been set):

parent.frames[parent.LEFT_FRAME_ID].hash="#100";

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

痴梦一场 2024-10-07 16:16:06

也许可以尝试 parent.frames[LEFT_FRAME_ID].location = "#100";

或者,虽然它更复杂并且有触发重新加载的风险,但您可以重写另一个框架的位置(扫描字符串中的#,然后替换其余部分)。

Maybe try parent.frames[LEFT_FRAME_ID].location = "#100";.

Alternatively, while it is more complicated and risks triggering a reload, you could rewrite the location of the other frame (scan the string for #, then replace the remainder).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文