事件处理应用实例怎么会没有对象??
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>商品评级</title>
<script language="javascript" type="text/javascript">
function $(id){ return document.getElementById(id);}
if(window.ActiveXObject){
var preload0= new Image();
preload0.src="a_23.jpg";
var preload1= new Image();
preload1.src="a_14.jpg";
}
var score=3;
function setScore(score){
for( var i=0;i<=5;i++){var img=$("img"+String(i));
img.src=(i<=score)?"a_23.jpg":"a_14.jpg";}
function commitScore(s){score=s;}
function resetScore(){setScore(score);}
}
</script>
</head>
<body>
<div id="vote">
星级:
<img src="a_23.jpg" id="img0" height="20px" width="20px"onmouseover="setScore(0)" onclick="commitScore(0)"onmouseout="resetScore()" alt="0"/>
<img src="a_23.jpg" id="img1" height="20px" width="20px"onmouseover="setScore(1)" onclick="commitScore(1)"onmouseout="resetScore()" alt="1"/>
<img src="a_23.jpg" id="img2" height="20px" width="20px"onmouseover="setScore(2)" onclick="commitScore(2)"onmouseout="resetScore()" alt="2"/>
<img src="a_23.jpg" id="img3" height="20px" width="20px"onmouseover="setScore(3)" onclick="commitScore(3)"onmouseout="resetScore()" alt="3"/>
<img src="a_14.jpg" id="img4" height="20px" width="20px"onmouseover="setScore(4)" onclick="commitScore(4)"onmouseout="resetScore()" alt="4"/>
<img src="a_14.jpg" id="img5" height="20px" width="20px"onmouseover="setScore(5)" onclick="commitScore(5)"onmouseout="resetScore()" alt="5"/>
</div>
<div>
<textarea rows="5" cols="25"></textarea>
</div>
<button>提交</button>
</body>
</html>