关于css定义标记<input>的显示样式的问题(在线等待)

在css中可以定义

1<input/>

的显示样式,如果我只想定义type="text"的样式,应该如何做?当然前提是不用

1<input class="form1" type="text"/>

而直接在css中定义,有没有办法?多谢了
---------------------------------------------------------------

下面三行代码存为 test.htm

1<style type="text/css">input{behavior:url('input.htc')}</style>
1<input/>
1<input id="text1" name="text1"/>
1<input id="text2" name="text2"/>
1<input type="checkbox"/>
1<input type="button"/>

把下面三行代码存为 input.htc

1<script>   
2if (/^text$/i.test(type)) style.cssText="border:1 solid #000000;width:100px"   
3</script>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus