ajax指无需加载整个网页的情况下,能够更新部分内容的技术。
function myfunction(){
var xmlhttp;
if(XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
}else{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readystate==4 && xmlhttp.status==200){
document.getElementById("div").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.get("GET","url",true);
xmlhttp.send();
}
ajax asp/php实例请求
ajax 数据库实例
ajax xml实例
转载于:https://blog.51cto.com/r0otkit/615795