CSS的onmouseover 和onmouseout事件
2013-04-26 13:58
381 查看
td { text-align: center; line-height: 30px; cursor: hand; color:#027CD1; /*设置onmouseover事件*/ onmouseover: expression(onmouseover=function (){ this.style.borderColor=''; this.style.backgroundColor='#E5EFF9'; this.style.color='#000'; }); /*设置onmouseout事件*/ onmouseout: expression(onmouseout=function (){ this.style.borderColor=''; this.style.color=''; this.style.backgroundColor=''}); }
这里也可以引申为this.style.backgroundImage='',
$("input[class='buttoncss']").each(function(){ $(this).mouseover(function(){ $(this).css("backgroundImage","url(<%=path%>/image/buttonBG/btnBG.png)"); }); $(this).mouseout(function(){ $(this).css("backgroundImage","url(<%=path%>/image/buttonBG/btnBG2.png)"); }); }); .buttoncss { font-family: "tahoma", "宋体"; font-size:9pt; color: #444444; cursor:pointer; background-image:url(<%=path%>/image/buttonBG/btnBG2.png); font-style: normal ; height:25px; margin-bottom:4px; width:85px; border:0px; }
相关文章推荐
- [整理]css中如何写入onmouseover和onmouseout事件
- jQuery事件 鼠标移动效果 onmouseover方法与onmouseout方法
- 在ImageButton上应用onmouseover和onmouseout事件
- Table的onMouseOver和onMouseOut鼠标事件的问题
- js中常用的事件,onclick 单击事件、onblur 失去焦点事件、onchange改变事件、onmouseover鼠标进入事件、onmouseout鼠标移除事件、onsubmit提交事件
- JQuery 之事件中的 ----- hover 与 onmouseover 、onmouseout 联系
- js中onmouseover 和 onmouseout 事件
- 用CSS怎样实现鼠标移上去背景颜色变色 onmouseover、onmouseout
- javascript完美解决onMouseOver、onMouseOut冒泡事件方法简单
- 深度理解onmouseover事件和onmouseout事件
- HTML onmouseover, onmouseout , onmousemove 事件属性
- js常用事件总结及案例-onMouseOver、onMouseOut
- onMouseEnter、onMouseLeave、onMouseOver、onMouseOut冒泡事件
- CSS+DIV实现鼠标经过背景变色 [onmouseover; onmouseout]
- onMouseover与onMouseout 的Javascript和CSS实现
- css实现下拉列表练习,原来javascipt的onmouseover和onmouseout可以用css轻松实现
- onMouseover与onMouseout 的Javascript和CSS实现
- CSS+DIV实现鼠标经过背景变色 [onmouseover; onmouseout]
- onMouseOver 和 onMouseOut事件冒泡
- css实现下拉列表练习,原来javascipt的onmouseover和onmouseout可以用css轻松实现