關(guān)于innerHTML的錯(cuò)誤。
lis[i].onclick?=?function(e){ ????????????e?=?e?||?window.event; ????????????stateList.style.display?=?"none"; ????????????if(e.stoppropagation){ ????????????????e.stopPropagation(); ????????????}else{ ????????????????e.cancelBubble?=?true; ????????????} ????????????var?id?=?this.id; ????????????stateTxt.innerHTML?=?getByClass("stateSelect_text",id)[0].innerHTML; ????????????loginStateShow.className?=?"login-state-show?"?+?id; ????????}
只要點(diǎn)擊選項(xiàng)框里的選項(xiàng),就會(huì)彈出錯(cuò)誤
如果不加這個(gè)改變InnerHTML的代碼,小圖標(biāo)可以正常顯示,加了后再點(diǎn)擊就會(huì)出錯(cuò),連小圖標(biāo)都不會(huì)變了。
找到錯(cuò)誤了,解決了。
stateTxt取錯(cuò)id了!
2017-02-20
........
2017-04-09
id怎么取錯(cuò)了?