<script type="text/javascript">
$(function(){
$('#example')[0].onmouseover = function(event) {
alert("something");
};
});
</script>
<body>
<img id="example" src="example.jpg" " alt="ooooh! ahhhh!"/>
</body
为什么我们需要[0]背后例如ID?
如果我们删除[0],为什么它不工作?