unction senfe(o,a,b,c,d){
var t=document.getElementById(o).getElementsByTagName("tr");
for(var i=0;i<t.length;i++){
t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
t[i].onclick=function(){
if(this.x!="1"){
this.x="1";
this.style.backgroundColor=d;
}else{
this.x="0";
this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
}
}
t[i].onmouseover=function(){
if(this.x!="1")this.style.backgroundColor=c;
}
t[i].onmouseout=function(){
if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
}
}
} var t=document.getElementById(o).getElementsByTagName("tr");这里的o是table,t是什么? if(this.x!="1")这里的this指的是什么?this.x又是什么属性,有没有其它属性?麻烦介绍下下。
var t=document.getElementById(o).getElementsByTagName("tr");
for(var i=0;i<t.length;i++){
t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
t[i].onclick=function(){
if(this.x!="1"){
this.x="1";
this.style.backgroundColor=d;
}else{
this.x="0";
this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
}
}
t[i].onmouseover=function(){
if(this.x!="1")this.style.backgroundColor=c;
}
t[i].onmouseout=function(){
if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
}
}
} var t=document.getElementById(o).getElementsByTagName("tr");这里的o是table,t是什么? if(this.x!="1")这里的this指的是什么?this.x又是什么属性,有没有其它属性?麻烦介绍下下。
<tr onclick="alert(this.x);" x="abc">
<td>
aaaaaaaaaa</td>
</tr>
</table>
HTML属性是可以自定义的,不光只是那几个
function test()
{
this.name = "louzhu";
this.sex = "woman";
alert(this.name);
}
呵呵