<script language="javascript" type="text/javascript">
$(document).ready(function(){
$("#Button1").click(function(){
$.ajax({
type:"post",
dataType:"text",
url:"Handler.ashx",
data:"username"+$("#Text1").val(),
success:function(msg){
alert(msg);
}
})
})
})
</script>
ashx:
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
string name = string.Empty;
if (context.Request["username"] != null)
{
name = context.Request["username"].ToString();
}
context.Response.Write(name);
}
在这里我怎么获取不到username的值呢?
拉风的咖菲猫
慕容3067478