NS_Binding_Aborted error for ajax function

坑。。。。。。。。。。。。。。
在提交的时候,发现,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”,这样不会刷新页面,于是每次都可以请求成功了。

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值