加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

NS_Binding_Aborted error for ajax function

发布时间:2020-12-16 03:29:52 所属栏目:百科 来源:网络整理
导读:坑。。。。。。。。。。。。。。 在提交的时候,发现,ajax提交的请求无法请求到Spring MVC里面去!!!奇怪了。但是,在请求的JavaScript函数当中,如果用一个alert弹出页面,即可请求到服务器去。于是乎,抓包发现,ajax的post请求的状态为NS_Binding_Abor

坑。。。。。。。。。。。。。。
在提交的时候,发现,ajax提交的请求无法请求到Spring MVC里面去!!!奇怪了。但是,在请求的JavaScript函数当中,如果用一个alert弹出页面,即可请求到服务器去。于是乎,抓包发现,ajax的post请求的状态为NS_Binding_Aborted。经过网上的查证,发现是还没有响应这个ajax的时候,这个页面被刷新了。

This is caused by another request that abort your request. Generally
when your goal is reload data o all page just end request and don’ts
is synchronized request,a little novell error. In this case the
“return ” sentence is the problem,the return sentence must be in
success seccion.

后来才发现,原来form表单中,不能使用button这个标签,而是要用input标签,type=“button”,这样不会刷新页面,于是每次都可以请求成功了。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读