2012年2月8日星期三

比较运算符写两个样式交替

<div  onclick="g(this)"></div>
function g(e){
e.className=(e.className=="a"?"a2":"a")
}

比较运算符写两个样式交替

TAG: