JS与asp.net如何交互
虽然现在有了Ajax,但我还是想了解是如何实现的。
比如无刷新评论,想了解js是如何将表单数据传给ashx的,而且页面无刷新无弹窗,ashx又是如何给js返回确认信息的。
<script> function button1_click() { var pl = document.getElementById("textbox1"); document.getElementById("pl").innerHTML += pl.value; //将评论显示到页面 pl.value = ""; //[color=#0000FF]如何在后台将数据传递给a.ashx并得到其返回值[/color] //[color=#0000FF]如果是对整个form提交,又是如何[/color] }</script>……<div id="pl"><!--评论都显示到这里--></div><input type="text" id="textbox1"/><input type="button" id="button1" onclick="button1_click()">