想用AJAX验证一个表单框中的内容,函数有了,不知道下一步该做什么了
function createXMLHttpRequest(){
if(window.ActiveXObject){
xmlHttp_request = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
xmlHttp_request = new XMLHttpRequest();
}
return xmlhttp_request;
}
验证注册时用户名是否可能,PHP验证程序是x.php,如何接收和返回数据?
我想要的效果就是表单框右边自动提示“可用”或者“不可用”。