Input 鼠标经过变色

Xhtml

<input id="inp_name" class="input_out" name="" type="text" 
onfocus
="this.className='input_on';this.onmouseout=''"
onblur
="this.className='input_off';this.onmouseout=function(){this.className='input_out'};"
onmousemove
="this.className='input_move'"
onmouseout
="this.className='input_out'" />

Css

/*input*/
.input_on{padding:2px 8px 0pt 3px;height:18px;border:1px solid #999;background-color:#FFFFCC;}
.input_off{padding:2px 8px 0pt 3px;height:18px;border:1px solid #CCC;background-color:#FFF;}
.input_move{padding:2px 8px 0pt 3px;height:18px;border:1px solid #999;background-color:#FFFFCC;}
.input_out{/*height:16px;默认高度*/padding:2px 8px 0pt 3px;height:18px;border:1px solid #CCC;background-color:#FFF;}


 

posted @ 2012-09-20 15:48  hm21  阅读(1842)  评论(0)    收藏  举报