刷新帧并跳转到锚点
我无法先刷新框架,然后跳到锚点。我在 onClick 事件中放置命令的顺序似乎没有什么区别。我什至试图将它们拉出到一个函数中,但无济于事。
<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">
这可以吗?
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. 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是因为您正在启动框架重新加载,并立即发出命令以转到另一个网址。您必须分配
onload
处理程序并将该锚点滚动到那里的视图中。This because you are initiating frame reload, and immediately issuing command to go to another url. You have to assign
onload
handler and scroll that anchor into view there.