js提示Uncaught TypeError: Cannot read property 'options' of null
来源:互联网 发布:18级毕业生 程序员 编辑:程序博客网 时间:2024/04/28 09:51
做web项目中,年份的下拉框无法下拉。跟踪前台代码发现,报出Uncaught TypeError: Cannot read property 'options' of null错误。代码如下:
提示错误为无法读取options。发现obj定义获取为“year”标签。而实际的jsp页面标签名字修改过,导致发生该错误。
解决办法:
检查调用对象是否存在。
检查对象获取的值、标签是否存在。
0 0
- js提示Uncaught TypeError: Cannot read property 'options' of null
- cocos2d-js-----Uncaught TypeError: Cannot read property 'style' of null
- Uncaught TypeError: Cannot read property 'options' of undefined 错误
- Uncaught TypeError: Cannot read property 'options' of undefined
- Uncaught TypeError: Cannot read property of 'name' null
- Uncaught TypeError: Cannot read property 'length' of null
- Uncaught TypeError: Cannot read property 'length' of null
- Uncaught TypeError: Cannot read property 'value' of null
- 【ExtJS】Uncaught TypeError: Cannot read property 'length' of null
- openlayers Uncaught TypeError: Cannot read property 'wrapDateLine' of null
- Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
- Uncaught TypeError: Cannot read property 'value' of null
- Uncaught TypeError: Cannot read property 'width' of null
- JavaScript:Uncaught TypeError Cannot read property 'id' of null。
- Uncaught TypeError: Cannot read property 'childNodes' of null
- Uncaught TypeError: Cannot read property 'offsetTop' of null
- Uncaught TypeError: Cannot read property 'value' of null
- Uncaught TypeError: Cannot read property 'querySelector' of null
- 现在使用应该也是不晚的
- 点击listview item 改变其背景
- 如何利用GIT和oschina来管理项目
- java之反射机制
- memcached整合项目
- js提示Uncaught TypeError: Cannot read property 'options' of null
- 集合
- Android框架
- nginx省去每次查看进程操作
- Wireshark如何选择多行
- 图像灰度值 灰度值与像素值的关系
- 关于checkpoint机制
- AsyncTask下载图片、显示进度
- Spring的69道面试题