<!DOCTYPE html PUBLIC "
<html xmlns="
<head>
<title>用戶名校驗實例</title>
<script src="
<script src="
</head>
<body onload="verify()">
用戶名校驗的jax實例
<!
<input type="text" value="" id="userName" />
<input type="button" value="提交" onclick=""/>
<!
<div id="result"></div>
<!
</body>
</html>
—>js頁
function verify() {
$("#userName")
var user = $(this)
var userobj = $(this);
$
});
}
function callback(data) {
$("#result")
}
—>aspx頁
<%
Response
string str_name = Request["userobj"];
if (str_name == "xtyang")
{
Response
}
else
{
Response
}
Response
%>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20385.html