使用EasyUI的新版本出现Cannot read property 'options' of undefined。

解决步骤:

1、通过浏览器js提示,确定问题所在。

使用EasyUI的新版本出现Cannot read property 'options' of undefined

使用EasyUI的新版本出现Cannot read property 'options' of undefined

2、断点,确定具体问题,可能出现循环调用,不是每次都抛异常,需要细心。

使用EasyUI的新版本出现Cannot read property 'options' of undefined

_24b是undifined,undefined调用属性options当然就报没有该属性,之后确定_24b的来源,$.data(_249,'panel');

之后了解easyui插件中的data方法,前面的是一个dom对象,后面是追加的属性,但是innerHTML为“”时,

就不是一个dom对象了,所以排除掉“”就可以了。

3、判断innerHTML是否为“”,是,直接返回,不是继续执行(注意清楚缓存)。

修改为:

使用EasyUI的新版本出现Cannot read property 'options' of undefined

效果:

使用EasyUI的新版本出现Cannot read property 'options' of undefined

不报错了。

easyui 页面加载出错 Cannot read property 'options' of undefined

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2021-11-22
  • 2021-07-09
  • 2021-12-02
  • 2022-01-06
  • 2021-08-12
猜你喜欢
  • 2021-08-24
  • 2021-06-08
  • 2021-07-22
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
相关资源
相似解决方案