close
目前筆記的項目有:「async」、「type」、「contentType」、「success」。
其他的,以後再陸續增加。
$.ajax(
{
async: false, // 非同步:ture(default)/false
type: "POST", // request類型:"Get"/"Post"
dataType: 'html',
url: 'testPage.do?',
data: 'serial=online&id=3&title=name', // url和data結合起來,即是:"testPage? serial=online & id=3 & title=name"
contentType: "application/x-www-form-urlencoded; charset=ISO-8859-1", // 'charset'可設定傳輸資料過去的編碼.
success: function( newHTML ) { // 如果成功,收到回應資料,要做什麼事。
document.getElementById( "listId" ).value = newHTML ;
aUrl = newHTML ;
}
}
); // $.ajax
文章標籤
全站熱搜
留言列表