jQuery:$.ajax({type: "POST",url: 'http://127.*.*.*/test.php',dataType: 'json',error: function(data){alert(data.success);},});PHP:$scwz1="http://www.bai**.com";echo "{success:$scwz1}";執行上面代碼后,可以發送post,并且有返回值(success:"http://www.bai**.com"),但只能執行error里的函數,且alert提示undefined,怎么才能顯示網址呢
ajaxPOST返回undefined
海綿寶寶撒
2018-07-09 13:18:17