onchange提交表格带有页面锚
无论如何,在提交时,使用类似此代码的东西可以通过HTML锚来跳到页面中的特定位置?
onChange="document.form2.submit()"
我在选择后提交的下拉菜单上面使用此代码,但是我还需要它传递页面锚。.这可行吗?
非常感谢
PS锚将取决于使用了哪个下拉菜单。例如,页面中有大约40个下拉菜单。因此,当您超过20个时,您必须继续向下滚动以选择下一个。下拉次数...希望这是有道理的。
Using something like this code is there anyway of passing a html anchor to jump to a particular place in the page when it has been submitted?
onChange="document.form2.submit()"
Im using this code above for a dropdown menu which submits after selection, but i also need it to pass a page anchor.. is this doable?
many thanks
ps The anchor will depend on which dropdown menu was used. There are, for example, around 40 dropdown menus in a page.. so when you get over 20 you have to keep scrolling down to select the next one.. this is why i need the page, after submitting, to jump to the last dropdown used... Hope this makes sense.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提交之前,将表单的操作设置为
url#您的锤子
。Set the action of the form to
url#your-hash
right before you submit.