我注意到在 Firefox 中,我可以将 #MyAnchor 标记添加到 action 属性中,例如...
<form action="#MyAnchor">
<input type="text" name="a" />
<input type="text" name="b" />
<input type="submit" />
</form>
提交表单后,锚点会自动显示在 URL 中,例如
mypage.aspx?a=1&b=2#MyAnchor
但是,这在 IE 上不起作用。无论如何我可以为这两种浏览器找到一个快乐的媒介吗?