当我尝试调用autopostback语句时,会发生以下错误:
Microsoft JScript运行时错误:找不到成员。
错误语句是: theForm.submit();
<script type="text/javascript"> 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();//error statement } } </script>是什么造成的?
When I am trying to call autopostback statements, the following error occurs:
Microsoft JScript runtime error: Member not found.
Error statement is: theForm.submit();
<script type="text/javascript"> 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();//error statement } } </script>What is causing this?
最满意答案
看起来你有一些错误或矛盾的'id'。 您应该检查您的html表单中的所有元素ID。 May be you have given ID like "Submit" 。 你不能在HTML中使用“submit”作为id。它会产生像你的错误。
有关更多参考,请访问此链接
http://www.velocityreviews.com/forums/t110670-__dopostback-fails-on-web-form-submit-net-2-0-a.html
It seems like you have somewhere wrong or contradictory 'id'. You should check your html form all elements ID.May be you have given ID like "Submit". You cannot use "submit" as id in HTML.It will generate error like yours.
For more reference visit this link
http://www.velocityreviews.com/forums/t110670-__dopostback-fails-on-web-form-submit-net-2-0-a.html
更多推荐
theForm,error,submit,statement,autopostback,电脑培训,计算机培训,IT培训"/> <m
发布评论