<html>
<head>
<title>页面局部刷新功能_www.jb200.com</title>
<script type="text/
javascript">
window.onload = function(){
document.getElementById("email").onblur = function(){
if(window.XMLHttpRequest){
http_request = new XMLHttpRequest();
if(http_request.overrideMimeType){
http_request.overrideMimeType("text/xml");
}
}else if(window.ActiveXObject){
try{
http_request = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
http_request = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
if(!http_request){
window.alert("不能创建XMLHttpRequest对象实例!");
return false;
}
http_request.onreadystatechange = function(){
if(http_request.readyState == 4 &&
http_request.status == 200) {
document.getElementById("emailTip").innerHTML
=http_request.responseText;
}
};
http_request.open("GET", "email.jsp?email="+this.value, true);
http_request.send(null);
}
}
</script>
</head>
<body>
<input type="button" value="修改" onclick="getOtherMessage();" />
<input type="text" id="email" />
<span id="emailTip"></span>
<div id="view">
456
</div>
</body>
</html>