首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

TextBox与CssClass有关问题: .test:focus{background-color : Red}

2012-01-15 
TextBox与CssClass问题: .test:focus{background-color : Red}我设了TextBox的cssclass为test,请问这样为

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支持

热点排行
Bad Request.