jquery ajax jqXHR.status is always 0

前端 未结 1 1043
广开言路
广开言路 2021-01-19 10:23

I\'m trying to submit a form with AJAX using jquery:

<
相关标签:
1条回答
  • 2021-01-19 10:41

    It is because you are not cancelling the click event of the submit button. You need to do it for both cases, not just the part in the if. Move that line before the if, the code will magically not be zero anymore.

    0 讨论(0)
提交回复
热议问题