jQuery ajax success error

后端 未结 3 1612
闹比i
闹比i 2021-02-19 03:02

I\'m trying to submit a form witch sends an email:

JS

var that = $(this);
$.ajax({
  url: \'../wp-content/themes/bsj/php/validate.php\',         


        
3条回答
  •  迷失自我
    2021-02-19 03:14

    Try to set response dataType property directly:

    dataType: 'text'
    

    and put

    die(''); 
    

    in the end of your php file. You've got error callback cause jquery cannot parse your response. In anyway, you may use a "complete:" callback, just to make sure your request has been processed.

提交回复
热议问题