<style>
.text{color:#ffffff}
.button{color:#ccccc}
</style>
<input type=text class="text">
<input type=button class="button">
.text{color:#ffffff}
.button{color:#ccccc}
</style>
<input type=text class="text">
<input type=button class="button">
调试欢乐多
我的需求是不要在input中绑定class属性 ,而是通过css选择符来设置。
终归还是得用class,呵呵。
color:expression( this.type=="button"?"red":(this.type=="text"?"blue":"") );
}