简体   繁体   English

刷新框架并跳转到锚点

[英]Refresh Frame AND Jump to Anchor

I am unable to get the frame to refresh first, THEN jump to the anchor. 我无法使框架先刷新,然后跳到锚点。 The order I put the commands in the onClick event seems to make no difference. 我将命令放在onClick事件中的顺序似乎没有什么区别。 I even tried to pull them out into a function to no avail. 我什至试图将它们拉出功能,但无济于事。

<input type="button"
onclick="edit_form.edit_mode.value=1;
edit_form.submit();
top.settings.location.reload();
top.settings.location='index.php?fuseaction=admin.displayCallReportSettings#3';"
value="Save"
name="save_button">

Is this possible to do? 这可能吗?

This because you are initiating frame reload, and immediately issuing command to go to another url. 这是因为您要启动帧重新加载,并立即发出命令以转到另一个URL。 You have to assign onload handler and scroll that anchor into view there. 您必须分配onload处理程序并将该锚点滚动到此处的视图中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM