日期:2014-05-16  浏览次数:20344 次

用prototype.js怎樣寫圖片被單擊的事件?
<img   id= "arrow "   src= "select_arrow.gif "   width= "15 "   height= "18 "   />

怎樣用prototype.js擴展的類或事件寫:
當$( "arrow ")被單擊時執行自定義函數a()?

------解决方案--------------------
<script language= "javascript ">
Event.observe($( 'arrow '), 'click ', function(event) {
alert( 'a ');
});
</script>