标签: javascript
如果我使用类似于
onerror=function(this) // in xhtml placed in element
然而,高级事件注册不起作用,即
a.onerror=function(this) // where a. is the element in javascript
当我想在失败时正确地将this.src更新为新图像。
答案 0 :(得分:0)
需要使用addEventListener