原版:
"http://www.w3.org/TR/html4/loose.dtd">
window.onload=function(){
vartt=document.getElementsByTagName('table')[0];
varcs=tt.rows[1].cells,ct=tt.rows[0].cells;
for(vari=0;i
}
functioncssAni(osrc,otarget,num,duration){
vart=null,c=1,d=0,n=0,i=Math.floor((duration||300)/num);
vars=otarget.className.replace(/.$/,''),r=/over/;
osrc.onmouseover=osrc.onmouseout=function(e){
n=r.test((e||event).type)?1:-1;
if(!t)t=setInterval(function(){
if((c==1||c==num)&&((d==n||c+n<1)||!(d=n)))
returnclearInterval(t),t=null;
otarget.className=s+(c+=d);
},i);
};
}
DIV版
"http://www.w3.org/TR/html4/loose.dtd">
window.onload=function(){
vartt=document.getElementsByTagName('div')[0];
varcs=tt.getElementsByTagName('label'),ct=tt.getElementsByTagName('p');
for(vari=0;i
}
functioncssAni(osrc,otarget,num,duration){
vart=null,c=1,d=0,n=0,i=Math.floor((duration||300)/num);
vars=otarget.className.replace(/.$/,''),r=/over/;
osrc.onmouseover=osrc.onmouseout=function(e){
n=r.test((e||event).type)?1:-1;
if(!t)t=setInterval(function(){
if((c==1||c==num)&&((d==n||c+n<1)||!(d=n)))
returnclearInterval(t),t=null;
otarget.className=s+(c+=d);
},i);
};
}
A
B
C
D
E
F
G