读书人

TextBox与CssClass有关问题: .test:f

发布时间: 2012-01-15 22:57:49 作者: rapoo

TextBox与CssClass问题: .test:focus{background-color : Red}
我设了TextBox的cssclass为test,请问这样为什么不能实现textbox取得焦点后背景变色?

[解决办法]
取得焦点的事件要在js里捕获的吧
[解决办法]
<input type= "text " id= "Text1 " style= "border:red 1px solid " onfocus= "this.style.backgroundColor= '#f7f7de ';this.style.border= 'green 1px solid '; " onblur= "this.style.backgroundColor= '#FFFFFF ';this.style.border= 'red 1px solid ' " />

[解决办法]
ie 不支持 ,firefox支持

读书人网 >asp.net

热点推荐