9-22編程鼠標(biāo)移動改變背景
請問一下源代碼里面的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
表示當(dāng)前function作用的對象。
2015-10-14
當(dāng)前對象,一般代表html網(wǎng)頁本身