Ajax
1 function Ajax() { 2 var xmlHttpReq = new XMLHttpRequest(); 3 xmlHttpReq.open("GET", "test.ashx", true); 4 xmlHttpReq.onreadystatechange = RequestCallBack; 5 xmlHttpReq.send(null); 6 7 function RequestCallBack() { 8 if (xmlHttpReq.readyState == 4) { 9 if (xmlHttpReq.status == 200) { 10 document.write(xmlHttpReq.responseText); 11 } 12 } 13 } 14 }
- get : Params,QueryString
post: Params,Form - serialize(): 按name序列化