Failed to load response dataNo data found for resource with given identifier
最新推荐文章于 2024-02-02 21:30:41 发布
当在form表单中使用AJAX和submit按钮时,form action会导致请求被取消,页面刷新。解决方法包括:1)将AJAX改为同步(效率降低);2)分离AJAX和form action;3)阻止表单默认提交,如修改button类型,使用preventDefault()或在form标签中添加οnsubmit=“return false;”。
摘要由CSDN通过智能技术生成