我給下面的em元素綁定了一個(gè)click事件 第一次點(diǎn)擊能觸發(fā) 觸發(fā)之后 通過(guò)innerHTML或者innertText改了內(nèi)容 之后再點(diǎn)擊這個(gè)元素就不能同志觸發(fā)事件了 這是為什么呢 獲取驗(yàn)證碼getMessageCode(evt) {let time = setInterval(() => { if (this.countDown <= 0) { clearInterval(time) this.countDown = 60 //this.isSend = false evt.target.innerText = '重新發(fā)送驗(yàn)證碼' }else { this.countDown -- evt.target.innerText = this.countDown + '秒倒計(jì)時(shí)' }}, 1000)}
不知道是JS還是vue的問(wèn)題
阿晨1998
2019-02-11 14:13:59