Ajax passes a parameter to the concrete implementation

Time:2021-9-23
Copy codeThe code is as follows:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//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 () {
$(‘#txtUserName’).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>
User name < input type = “text” / > < span > < / span > < br / >
Password < input type = “text” / >
</div>
</body>
</html>

Recommended Today

Simulation of M/M/1 random service queuing system in R language

Original link:http://tecdat.cn/?p=8199 Original source:Tuoduan Data Tribe Public Account In this article I construct a _discrete event_ simulation of a simple M/M/1 queue in R.  Simulation variables As usual, we start with the simulation and the variables needed for its detection. t.end <- 10^5 # 模拟的持续时间 t.clock <- 0 # 模拟时间 By &lt;- 1.3333 # arrival interval Ts <- 1.0000 # 服务期 t1 &lt;- 0 # 下一个时间的时间 t2 […]