[英]Prevent page reloading after jQuery post
I wouldn't ask you if other solutions work, but neither e.preventDefault() nor return false works.我不会问你其他解决方案是否有效,但 e.preventDefault() 和 return false 都不行。 When I use prevent default ajax doesn't make post request.
当我使用阻止默认 ajax 时,不会发出 post 请求。 $.post also doesn't work.
$.post 也不起作用。 And with return false at the end of submit function doesn't have any affect
并且在提交功能结束时返回 false 没有任何影响
只需将 return 添加到 onsubmit 并将 false 返回到函数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.