Sunday, February 22, 2009
« ASP.NET MVC page input validation | Main | DAZ Studio + pwcatch »

有时候我们要给所有的html input 标签设定相同的css, 那可以这样写:

INPUT
{
 border: 1px #444444 solid;
}

但有时候, 我们可能仅要对特点type的input 标签 (如:文本框 )设定 相同的css 怎么作呢?  一个一个设太麻烦了.

因此, 对于 firefox 浏览器 我们可以这样写

INPUT[type="text"]
{
 border: 1px #444444 solid;
}

但以上方法 IE是不支持的, 对于IE , 我们就需要这样写:

INPUT
{
 border: expression((this.type=="text")?"1px #444444 solid":"style");
}