标签: javascript html html5
将click事件处理程序附加到没有任何语义含义的div或spans是不对的?
<div id="my-div"></div> <script> var el = document.getElementById("my-div"); el.addEventListener("click", function() { alert('div clicked but does it make sence?') }, false); </script>