Form OnSubmit to wait jQuery Ajax Return?

前端 未结 2 687
不知归路
不知归路 2020-12-20 04:32

I want to trigger $.ajax on form onsubmit and return true only after Ajax return is something valid.

For example:



        
2条回答
  •  既然无缘
    2020-12-20 04:49

    Return value at mark 1 is for your success function of ajax request, not for your validation function. Therefore even if it returns it returns only from there and not from validation function which is mark 2

提交回复
热议问题