<input type="button" style="background:url(../../../../asset/shtml/default/www/images/tuan_button.jpg) no-repeat; width:73px; height:28px; border:none; cursor:pointer;" onMouseOut= "this.style.backgroundImage= 'url(../../../../asset/shtml/default/www/images/tuan_button.jpg) '; " onMouseOver= "this.style.backgroundImage= 'url(../../../../asset/shtml/default/www/images/tuan_button1.jpg) '; " />
请教各位?
------解决方案--------------------
- JScript code
<script type="text/javascript"> function mouseover(element) { element.style.backgroundImage= 'url(.....)'; } </script>
------解决方案--------------------
教你一个最简单的方法 :
把你的input换成 a标签
JS 代码都不用写了
改变的样式写在a:hover里面
------解决方案--------------------
用jQuery
//发送图片鼠标滑过
$("#sendBtn_pic").mouseover(
function (){
$(this).attr("background","../source/image/fs_0.jpg");
}
);
//发送图片鼠标离开
$("#sendBtn_pic").mouseout(
function (){
$(this).attr("background","../source/image/fs.jpg");
}
);
------解决方案--------------------
------解决方案--------------------
IE支持onmouseover事件好不
而且你的写法也是可以的,自己加一句alert()测试下事件有否执行吧