ajax中如何组织传输的数据...
请求的页面是个aspx页面,页面上有一个文本框TextBox1和一个按钮Button1,
都是服务器端控件,下面是点击Button1的代码
protected void Button1_Click(object sender, EventArgs e)
{
if (this.TextBox1.Text == "AAA")
{
Response.Write("1234567890");
Response.End();
}
else
{
Response.Write("ABCDEFG");
Response.End();
}
}
下面是ajax的请求
function Button4_onclick() {
var xmlHTTP = new ActiveXObject("MSXML2.XMLHTTP");
xmlHTTP.open("POST", "http://192.168.1.129/svr.aspx", false);
xmlHTTP.send("这里的数据如何写");
window.tmp.innerText = xmlHTTP.responseText;
}
请问该如何组织send里的数据,
发送这个请求后就可以让服务器端执行Button1_Click函数