1function setClass(dom, className){
2 try{
3 dom.className = className;
4 //IE7及以下设置className方法 }
5 catch(e){}
6 dom.setAttribute('class', className);
7}
1function setClass(dom, className){
2 try{
3 dom.className = className;
4 //IE7及以下设置className方法 }
5 catch(e){}
6 dom.setAttribute('class', className);
7}