当前位置:编程学习 > C#/ASP.NET >>

theForm._EVENTTARGET

错误:'theForm._EVENTTARGET'为空或不是对象。

这是怎么回事啊,我用360运行又不会出现这问题,用IE运行就出现这个问题 --------------------编程问答-------------------- javascript脚本错误。

用脚本调试器调试下。 --------------------编程问答-------------------- form是否嵌套,只能有一个form 
var theForm = document.forms['form1']; 
if (!theForm) { 
    theForm = document.form1; 

换其他浏览器看看
--------------------编程问答-------------------- 是否有多个form --------------------编程问答-------------------- 我没有嵌套form啊,只有一个form

function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}

调试的时候说这句有问题:theForm.__EVENTTARGET.value = eventTarget;
--------------------编程问答-------------------- 自己先顶一下
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,