0
var testAjax = {
init: function(){
$('#query').on('click', '#starter', this.loadAjax);
},
loadAjax: function(){
$.ajax('ajax/workOne.html', {
success: function(response){
$('#answer').children('h3').html(response);
},
data: {
'confTot': 5678
}
});
}
};
testAjax.init();
所以我有這個重構Ajax代碼,而我在叫'workOne.html?confTot=5678'
這樣我就可以用這個Ajax代碼把它在./ajax/
文件夾中的文件。但是當我在Chrome DevTools中運行代碼時,即使我在ajax文件夾中使用適當和相同的名稱存在此文件,ajax調用也無法GET
html文件'ajax/workOne.html?confTot=5678'
。我如何能夠訪問我感興趣的特定html。先謝謝您的專業知識!獲得通過與數據參數AJAX在HTML文件中的目標HTML
我認爲這是我在一篇文章中看到的最「ajax」。我們不能只說「HTTP請求」嗎?請? – 2014-09-30 18:20:52