<!DOCTY
PE ht
ML P
ubLIC "-//W3C//DTD XHTML 1.0 Trans
ITional//EN" "http://www.w3.
org/TR/xhtml1/DTD/xhtml1
-transitional.dtd">
<html
XMlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="js/
jquery1.7.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('
#txtUserN
ame').blur(function () {
$.ajax({
type: "post",
contentType: "application/json",
url: "WebService1.asmx/ValidateUser",
data: "{username:'" + $('#txtUserName').val() + "'}",
success: function (result) {
$('#spinfo').text(result.d);
}
})
})
})
</script>
</head>
<body>
<div>
用户名<input type="text" id="txtUserName" /><span id="spinfo"></span><
br />
密码<input type="text" id="txtPwd" />
</div>
</body>
</html>