日期:2014-05-17 浏览次数:20412 次
<script type="text/javascript">
var xmlhttp;
var result;
function btn_logn_Clock() {
var userName = document.getElementById("username").value;
var userPwd = document.getElementById("password").value;
xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
var data = "username=" + encodeURIComponent(userName)
+ "&password=" + encodeURIComponent(userPwd);
xmlhttp.open("Post", "Default2.aspx", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
result = xmlhttp.responseText;
}
}
xmlhttp.send(data);
}
</script>
protected void Page_Load(object sender, EventArgs e)
{
string userName = string.Empty;
string password = string.Empty;
userName = Request.Form["username"];
password = Request.Form["password"];
Response.Write("姓名:’" + userName + "'<br/> 密码:" + password);
Response.End();
}