<html>
<head>
<title>eeeee
</title>
</head>
<script>
function doAlert(source){
window.alert(source.id);
}
function doTest(){
var menuCount;
menuCount=window.tbl.rows.length;
for(var i=0;i<menuCount;i++)
{
window.tbl.rows(i).attachEvent("onMouseMove",doAlert(this)); //这样写不行,请教怎么写
}
}
</script>
<body onload="doTest();">
<table id="tbl" >
<tr id="tr1">
<td>
AAAAAAAAAA
</td>
</tr>
<tr id="tr2">
<td>
DDDDDDDDDD
</td>
</tr>
</table>
</body>
</html>
动态给组件设置事件:求助