我有一个ajax功能:
$.ajax({
url: 'my.php',
type:'POST',
dataType: 'json',
data:{switch:9},
error: function(data,e,f){
alert("Error : "+e+" "+f);
console.log(JSON.stringify(data));
},
success:function(data){
if(data.length!=0){
// getting the data from the array
$.each(data, function(k, v) {
// set the data from database to input box
$("input[name='fname']").val(v['fname']);
$("input[name='bname']").val(v['bname']);
$("input[name='address']").val(v['address']);
$("input[name='phone']").val(v['phone_no']);
$("input[name='website']").val(v['website']);
$("input[name='ein_ss_no']").val(v['ein_ss_no']);
$(".user-catagory").val(v['business_type']).change();
});
}
} // End of success function of ajax 1 form
});

00:24:17.314 {"readyState":4,"responseText":"<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n<!-- title -->\n<title></title>\n\n<!-- css link -->\n<link rel=\"stylesheet\" type=\"text/css\" href=\"web_assets/css/bootstrap.css\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"web_assets/css/custom.css\">\n\n<script type=\"text/javascript\" src=\"assets/js/jquery.min.js\"></script>\n \n <script type=\"text/javascript\" src=\"assets/js/bootstrap.min3.js\"></script>\n <link rel='stylesheet' href='ASLibrary/css/style3.css' type='text/css' media='all' />\n \n <script type=\"text/javascript\" src=\"assets/js/respond.min.js\"></script>\n <script type=\"text/javascript\">\n var $_lang = {\"email\":\"Email\",\"login\":\"Login\",\"username\":\"Username\",\"password\":\"Password\",\"your_email\":\"Your Email\",\"login_with\":\"Login With[…]1 add_profile.js:10:9
&#13;
....等等。 我完全混淆了为什么我的代码正在运行而没有运行一些。 如果有人知道,请帮助我。