countload(“http://example.com/Noname13.php?input=11111&username=aaa”);
function countload(resource) {
if (window.XMLHttpRequest)
{
xmlObj = new XMLHttpRequest();
}else if (window.ActiveXObject){
xmlObj = new ActiveXObject(“Microsoft.XMLHTTP”);
}else{
return;
}
xmlObj.onreadystatechange = handleResponse;
xmlObj.open(“GET”,resource,true);
xmlObj.send(“”);
}
function handleResponse()
{
if (xmlObj.readyState == 4){
//xmlObj loaded
if (xmlObj.status == 200)
{
var data = xmlObj.responseText;
var obj = document.getElementById(“data”);
obj.innerHTML = data;
}
}
}
ajax 简单异步提交实例
Good writing. Keep up the good work. I just added your RSS feed my Google News Reader..
Matt Hanson