鍍金池/ 問(wèn)答/HTML5  HTML/ 微信小程序報(bào)不能識(shí)別length方法?

微信小程序報(bào)不能識(shí)別length方法?

clipboard.png

回答
編輯回答
憶當(dāng)年

cannot read property 'length' of undefined
cannot read property 'length' of undefined
cannot read property 'length' of undefined

不是不能識(shí)別length,是不能讀取undefined.length。所以是你要讀取的length的目標(biāo)對(duì)象本身不存在(或值為空)!

2018年8月8日 09:00
編輯回答
兔寶寶

你先打印出來(lái)要獲取length的對(duì)象,在獲取length獲取之前打印 先定位一下錯(cuò)誤 如果沒解決就把圖貼出來(lái)

2018年6月15日 05:10
編輯回答
孤慣

錯(cuò)誤信息都讀不懂!

2017年3月10日 13:39