0
我试图将点击事件,像这样回应图像上的事件。为什么这不起作用?原型 - 单击图像
$$('refresh').each(function(element) {
element.observe('click', respond);
})
function respond(event) {
alert("hello");
}
<img src="images/refresh.jpg" id="refresh" />