原文:Uncaught TypeError: Cannot read property 'trim' of undefined

可以这样写,有值的时候trim,没值的时候为空 let user this.state.name.trim ...

2018-07-02 16:35 0 1740 推荐指数:

查看详情

Uncaught TypeError: Cannot read property ‘split’ of undefined

问题 :Uncaught TypeError: Cannot read property ‘split’ of undefinedat HTMLLIElement. split()切割的问题 因为遍历ul的时候,第一次会得到一个空值,这个是通过输出遍历的对象知道的,最后我在使用split ...

Sat Apr 27 02:23:00 CST 2019 0 1095
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM