this is my ajax resposnenewid12ostatusmodifytitleu0645u0631u0627u0642u0628u062a u0627u0632 u067eu0648u0633u062a2and this is my jquery code $ajax type POST url qqajaxurl data action the
The issue is with the dataType parameter in your AJAX request. You have set it to 'html', but your response is in JSON format.
To fix the issue, change the dataType parameter to 'json' in your AJAX request:
$.ajax({
type: 'POST',
url: qqajaxurl,
data: {'action' : the_action,'target_id' : target_id,'cname' : cname,'cnamel' : cnamel,'cdescription' : cdescription,'pimg' : pimg,'qpiority' : qpiority},
dataType: 'json',
success: function(d_page) {
// Rest of your code
}
});
With this change, the response will be automatically parsed as JSON, and you will be able to access the properties like newid, ostatus, and title correctly
原文地址: https://www.cveoy.top/t/topic/iBbW 著作权归作者所有。请勿转载和采集!