日期:2014-05-17  浏览次数:20726 次

把autopostback设置为true后总是报错:Microsoft JScript 运行时错误: 找不到成员。
本帖最后由 haoxinqinghaha 于 2012-08-02 13:12:28 编辑
把textbox的autopostback设置为true后,编译能通过,但对textbox输入信息并失去焦点时,总是报错:Microsoft JScript 运行时错误: 找不到成员。提示出错的是下面加亮部分:
<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>
求高手指点!!

------解决方案--------------------
引用:
就是把autopostback设置为true就会报错,设置为false就不报错。不知是哪里设置的问题还是怎么回事,现在就是autopostback不能用了,郁闷ing


你的页面可能有个ID为submit的Button控件吧,把这个button控件的ID该了应该就不会出错了