6 回答
TA贡献446条经验 获得超754个赞
<script type="text/javascript">
window.onload = function(){
var h=document.getElementsByTagName('tr');
for(i=0;i<h.length;i++){
h[i].onmouseover=change;
}
}
function change(){
this.style.backgroundColor="#f2f2f2";
}
</script>
TA贡献446条经验 获得超754个赞
<script type="text/javascript">
window.onload = function(){
var h=document.getElementsByTagName('tr');
for(i=0;i<h.length;i++){
h[i].setAttribute("onmouseover",'change.apply(this)');
}
}
function change(){
this.style.backgroundColor="#f2f2f2";
}
</script>
TA贡献446条经验 获得超754个赞
<script type="text/javascript">
window.onload = function(){
var h=document.getElementsByTagName('tr');
for(i=0;i<h.length;i++){
h[i].setAttribute("onmouseover",'change(this)');
}
}
function change(self){
self.style.backgroundColor="#f2f2f2";
}
</script>
添加回答
举报