62,046
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
可是我们可以重写asp.net的方法啊!例如protected void Page_Load(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "重写回发机制",
"__oldDoPostback=__doPostBack; " +
"__doPostBack=function(eventTarget, eventArgument) {" +
" alert('秘密警察已经记录了你给asp.net应用程序的回发数据.');" +
" __oldDoPostback(eventTarget,eventArgument);" +
"}", true);
}