theForm.__EVENTTARGET 为空
来源:互联网 发布:守望先锋天使数据 编辑:程序博客网 时间:2024/05/17 09:07
描述:
if (typeof __doPostBack != "function") { function __doPostBack(eventTarget, eventArgument) { var theForm = document.forms['form1']; if (!theForm) { theForm = document.form1; } if (theForm && (!theForm.onsubmit || (theForm.onsubmit() != false))) { theForm.__EVENTTARGET.value = eventTarget;//这里提示错误,不同浏览器提示错误不一样,大致就是__EVENTTARGET是空 theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } }
解决方法:
在html页面加上
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
猜测原因:
页面没有生成上面俩个隐藏的 (控件)元素,所以自己加上一个吧!
阅读全文
0 0
- theForm.__EVENTTARGET 为空
- theform._eventtarget 为空或者不是对象
- theForm.EVENTTARGET为空或不是对象
- 对象不支持theForm.submit()
- 简单介绍__VIEWSTATE/__EVENTTARGET/__EVENTARGUMENT
- 判断数组为空
- 判断字符串为空
- 判断String为空
- sa密码为空
- TextBox不允许为空
- C#事件为空
- findViewById为空
- C#事件为空
- 判断Resultset为空
- HttpFileCollection为什么为空?
- 不为空处理
- SQL判断为空
- document.body为空
- Discuz!手机版版块页面主题列表中隔几个主题插入一个广告位的方法
- html之jQuery知识总结
- 实验一木马分析(隐藏分析)实验
- 简单高精度乘法与简单高精度快速幂
- Erlang 语言中的进程与并发
- theForm.__EVENTTARGET 为空
- 浅谈决策单调性在1D1D动态规划中的运用
- [JZOJ5427]吃草
- caffe:Failed to parse NetParameter file
- Unity3D 大型游戏 最后一站 源码 部分重点 GameView-LoginWindow(17)
- 2017年电气报价软件排名!评分最高的是它
- Android media player
- SQL Serve大全
- [设计模式]面向对象设计原则之合成/组合复用原则