課程
/前端開(kāi)發(fā)
/JavaScript
/DOM事件探秘
我的代碼顯示這個(gè)錯(cuò)誤??什么鬼啊
2015-10-15
源自:DOM事件探秘 4-5
正在回答
我遇到的時(shí)候弄錯(cuò)這樣的格式就好了:
window.onload=function(){
//your code
}
然后就可以運(yùn)行了
EpisodeOne 提問(wèn)者
你onclick綁定的對(duì)象沒(méi)有獲取到是個(gè)null,
比如寫(xiě)成這樣a.onclick,你要確保a是個(gè)元素節(jié)點(diǎn)對(duì)象。
舉報(bào)
DOM事件?本課程會(huì)通過(guò)實(shí)例來(lái)給小伙伴們講解如何使用這些事件
2 回答報(bào)錯(cuò): Uncaught TypeError: Cannot set property 'onmousedown' of undefined
3 回答drag.js:4 Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
2 回答幫忙看一下為什么提示qq.js:24 Uncaught TypeError: Cannot set property 'onmousedown' of undefined
4 回答為什么會(huì)出現(xiàn)Uncaught TypeError: Cannot read property 'css' of undefined 錯(cuò)誤
1 回答Uncaught TypeError: Cannot read property 'getElementsByTagName' of null,一直報(bào)這個(gè)錯(cuò),有人遇到一樣的嗎?用google/firefox都試過(guò)了
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-02-21
我遇到的時(shí)候弄錯(cuò)這樣的格式就好了:
window.onload=function(){
//your code
}
然后就可以運(yùn)行了
2015-10-17
你onclick綁定的對(duì)象沒(méi)有獲取到是個(gè)null,
比如寫(xiě)成這樣a.onclick,你要確保a是個(gè)元素節(jié)點(diǎn)對(duì)象。