================ Js ============================
Copy codeThe Code is as follows: var xhr = new XMLHttpRequest ();
Xhr. open ("get", 'controls/gengCart. ashx? CartID = '+ input +' & count = '+ indium, true );
Xhr. setRequestHeader ("If-Modified-Since", "0 ");
Xhr. onreadystatechange = function (){
If (xhr. readyState = 4 & xhr. status = 200 ){
Var result = xhr. responseText;
Var json = eval ("(" + result + ")");
Alert (js. name );
}
};
Xhr. send (null );
=============== Jquery ==================================Copy codeThe Code is as follows: $. post ('controls/Cart. ashx', {"productID": <% = GetID %>, "count": "1", "userID": '<% = uid %> '}, function (data, statu ){
If (statu = 'success '){
If (data = "false "){
Alert ("Please log on before this operation ");
}
Else {
Window. location = "gwc. aspx? Uid = "+ '<% = uid %> ';
}
}
})