<script type="text/javascript" >
var xmlHttp ;
function createXmlHttp(){
if(window .XMLHttpRequest){
//针对firefox,mozillar,opera,safari,IE7,IE8
xmlHttp = new XMLHttpRequest();
//针对某些特定版本的mozillar浏览器的bug进行修正
if(xmlHttp .overrideMimeType){
xmlHttp.overrideMimeType ("text/xml");
}
}else if(window .ActiveXObject){
//针对IE6,IE5.5,IE5
try{
xmlHttp=new ActiveXObject("MSXML2.XMLHTTP" );
}catch( e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP" );
}catch( e){
alert("不能创建XmlHttpRequest" );
}
}
}
}
function checkemail( obj){
createXmlHttp();
var url = "reg?email=" +obj+ "&k=" +Math. random();
xmlHttp.open ('get', url,true);
xmlHttp.send (null);
xmlHttp.onreadystatechange = callback;
}
function callback(){
if(xmlHttp .readyState == 4 ){
document.getElementById ("emailError").innerHTML = xmlHttp .responseText;
}
}
</script>
已有 0 人发表留言,猛击->> 这里<<-参与讨论
ITeye推荐