首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

TypeError: Cannot call method 'getValue' of undefined,该如何处理

2014-01-17 
TypeError: Cannot call method 'getValue' of undefined使用miniui时报错求教怎么改[解决办法]

TypeError: Cannot call method 'getValue' of undefined
使用miniui时报错
TypeError: Cannot call method 'getValue' of undefined,该如何处理

求教怎么改
[解决办法]
get(...)获得的是个什么?
[解决办法]
不知道你用的什麽JS庫

mini.get('materialName') 得到的如果只是DOM對象,那肯定不會有getValue方法

如果得到的是一個封裝的如果jQuery對象一樣的東西,那么:
1.getValue方法沒有定義,不存在
2.頁面上沒有ID為materialName的元素
3.此元素沒有類似表單元素的value屬性,所以此元素封裝的對象沒有綁定上getValue方法

热点排行