<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>register Page</title>
<style type="text/css">
h1{
font-size : 150%;
font-family : Showcard Gothic;
color : #ff6c01;
}
table{
width : 80%;
border : 1px solid #b5b5b5;
background : #ff;
}
table td{
margin : 0 ;
padding : 8px 20px;
text-align : center;
}
table td.title{
margin : 0 ;
padding : 8px 20px;
text-align : right;
font-size : small;
background : #FFCCA6;
}
table td.remark{
margin : 0;
font-size : small;
text-align : left;
}
</style>
<script language="javascript">
var httpRequest = false;
function createRequest(){
try {
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
httpRequest = false;
}
}
if (!httpRequest && typeof XMLHttpRequest != 'undefined') {
httpRequest = new XMLHttpRequest();
}
}
function getBackInfo(){
var username = document.getElememtById("username").value;
var url='checkUser.jsp?username='+username;
httpRequest.open("GET",url,"true");
httpRequest.onreadystatechange=disResult;//隐性的循环
httpRequest.send(null);
}
function disResult(){
if(httpRequest.readystate == 4){
if(httpRequest.status == 200){
//一切都OK了,那就该用Javascript去执行你想要的动作了
document.getElememtById("disCheckResult").value=request.responseText;
alert("done");
}
else{
alert("Something Wrong has Happend!");
}
}
}
</script>
</head>
<body>
<h1>①Step.name</h1>
<form action="" method="post" name="rf">
<table align="center" cellspacing="0">
<tr>
<td width="20%" class="title">name:</td>
<td width="30%"><input type="text" id="username" name="uname" maxlength="20" onblur="getBackInfo()"></td>
<td width="50%" class="remark" ><dd id="disCheckResult"></dd></td>
</tr>
</table>
</form>
</body>
</html>
说我的那一行有问题,但是不知道怎么改,请各位大哥帮我改改,谢谢!