jquery 异步获取数据
$("#div").load("test.aspx");
$.get(url,[data],[callback]);
$.post(url,[data],[callback],[type]);
$.ajax(options)
function creatQueryString(){
var firstName=encodeURL($("#firstname").val());
var birthday=encodeURL($("#birthday").val());
//组合成对象的形式
var queryString={firstName:firstname,birthday:birthday};
return queryString;
}
function doRequestUsringGET()
{
$.get("1.aspx",creatQueryString,
function(data){
$("#serverResponse").html(decodeURL(DATA));
}
);
}
function doRequestUsringPOST()
{
$.post("1.aspx",creatQueryString,
function(data){
$("#serverResponse").html(decodeURL(DATA));
}
);
}