9-22編程鼠標移動改變背景
請問一下源代碼里面的this代表的是什么?
function?Highlight(){
var?tbody?=?document.getElementById('table').lastChild;
trs?=?tbody.getElementsByTagName('tr');???
for(var?i?=1;i<trs.length;i++){
trs[i].onmouseover?=?function(){
this.style.backgroundColor?="#f2f2f2";
}?
trs[i].onmouseout?=?function(){
this.style.backgroundColor?="#fff";
}?
}??
?}
2015-10-21
表示當前function作用的對象。
2015-10-14
當前對象,一般代表html網頁本身