作者:JJJppp123 | 来源:互联网 | 2023-01-02 14:14
Ihaveaformwhereiprovideanameandsubmit.Thisusesajaxandigetresposefromtheserver.
I have a form where i provide a name and submit . This uses ajax and i get respose from the server . IF I dont add a name and try to submit i get an error message . I want to redirect to a url when the submit was successful and not redirect when response was error .
我有一个表格,我提供一个名称并提交。这使用ajax,我从服务器得到respose。如果我不添加名称并尝试提交我收到错误消息。我想在提交成功时重定向到网址,而在响应错误时不重定向。
below is the screenshot of firebug which shows successful and error respose response http://i.minus.com/jbaILwvIGfmgX7.bmp Please can someone provide a jquery script which can handle such situation . Do let me know if you need more info from me. Thanks in Advance .
下面是firebug的屏幕截图,显示成功和错误响应响应http://i.minus.com/jbaILwvIGfmgX7.bmp请有人提供一个可以处理这种情况的jquery脚本。如果您需要我的更多信息,请告诉我。提前致谢 。
1 个解决方案