内部事件注册与图像验证的高级注册



如果我使用类似于

的代码,则内联事件注册正常工作
onerror=function(this) // in xhtml placed in element

但是高级事件注册不起作用,即

a.onerror=function(this) // where a. is the element in javascript

当我想正确地更新这个。SRC到新映像失败。

需要使用addEventListener

最新更新