做asp.net項目 使用ajax
$.ajax({
url: '../Music/Default2.aspx?Types=' + type + '&texts=' + text + '',
type: 'GET',
// data: '&texts=' + text + '',
dataType: 'json',
success: function (data) {
console.log(data);
}
});
都沒有問題 返回數據,打印出data 結果 發現沒有數據
去NetWork查看 已經 進行了

然后 加了個error 輸出

一般都是說 datatype 類型錯誤
或者是 Url 不能有中文
結果 還是無效果,突然看見 一片博文
說只要刪除datatype 就可以了
試了試
結果出來了

嗯 就是這樣
