function checklogin(){
if(loginName.value!=""){
//创建XMLHttpRequest对象
http_request = false
if (window.XMLHttpRequest) {
http_request = new XMLHttpRequest()
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml')
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP")
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP")
} catch (e) {}
}
}
if (!http_request) {
alert('不能创建 XMLHTTP 实例')
return false
}
http_request.onreadystatechange = CheckGroupName//onreadyStateChange事件可指定一个事件处理函数来处理XMLHttpRequest对象的执行结果
http_request.open('POST', "/rdflz/UsersAction.do?method=checkLoginUser&login_name="+loginName.value, true)//设置请求方法及目标,并且设置为异步提交
http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")//单独设定某个请求的HTTP头信息
http_request.send(null)//发送请求
return false
}else{
alert("请输入用户名")
}
}
function CheckGroupName() {
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)