The front desk
Data shown here
Var XHR=new window. The XMLHttpRequest ();
The function the sendRequest () {
XHR. Onreadystatechange=function () {
If (XHR. ReadyState==4) {
If (XHR. Status==200) {
Document. The getElementById (" Creadit "). The innerHTML=XHR. The responseText;
}
}
};
Var name=document. GetElementById (" name1 "). The value;
XHR. Open (" POST ", "Handler1. Ashx", true);
XHR. SetRequestHeader (" ContentType ", "application/x - WWW - form - urlencoded");
XHR. Send (" username "+ name);
}
</script>
Background: the string name=context. The Request (" name "),
The context. The Response. The Write (" Hello World "+ name);
Name is NULL but XHR. Send a data if add a coding have worked with JQuery is ok but not the native, but add code is can again