谁有啊?发一份完整的上来,谢谢
最关键的是注册页面怎么获取"判断是否存在用户名的JSP页面的返回值"
以下是部分代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT language=javascript type=text/javascript>
var xmlHttp = false;
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
function callServer() {
var u_name = document.getElementById("u_name").value;
if ((u_name == null) || (u_name == "")) return;
var url = "cu.asp?name=" + escape(u_name); // 这里调用ASP页面,JSP判断页面怎么写,如何获取判断页面的值
xmlHttp.open("GET", url, true); //举个例说这里调用var url="usercheck.jsp?name="+escape(u_name);
xmlHttp.onreadystatechange = updatePage;
xmlHttp.send(null);
}
function updatePage() {
if (xmlHttp.readyState < 4) {
test1.innerHTML="正在检测";
}
if (xmlHttp.readyState == 4) {
var response = xmlHttp.responseText;
test1.innerHTML=response;
}
if (test1.innerHTML=="已被注册"){
document.form1.submit.disabled=true}else{
document.form1.submit.disabled=false
}
}
</SCRIPT>
<FORM name=form1 action=t1.asp method=post autocomplete="off">
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<BODY>用户名: <INPUT id=u_name onchange=callServer(); name=u_name> <SPAN
id=test1>是否能注册</SPAN><BR>密 码:<INPUT type=password> <INPUT type=submit value=注册 name=submit> </FORM></BODY></HTML>