functiontest(){
? ? ? $.ajax({
//提交數(shù)據(jù)的類型 POST GET
type:"POST",
//提交的網(wǎng)址
url:"testLogin.aspx",
//提交的數(shù)據(jù)
data:{Name:"sanmao",Password:"sanmaoword"},
//返回?cái)?shù)據(jù)的格式
datatype:"html",//"xml", "html", "script", "json", "jsonp", "text".
//在請(qǐng)求之前調(diào)用的函數(shù)
beforeSend:function(){$("#msg").html("logining");},
//成功返回之后調(diào)用的函數(shù)? ? ? ? ? ?
success:function(data){
$("#msg").html(decodeURI(data));
? ? ? ? ? ? }? ,
//調(diào)用執(zhí)行后調(diào)用的函數(shù)
complete:function(XMLHttpRequest, textStatus){
? ? ? ? ? ? ? alert(XMLHttpRequest.responseText);
? ? ? ? ? ? ? alert(textStatus);
//HideLoading();
? ? ? ? ? ? },
//調(diào)用出錯(cuò)執(zhí)行的函數(shù)
error:function(){
//請(qǐng)求出錯(cuò)處理
? ? ? ? ? ? }? ? ? ?
? ? ? ? });