<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) '; " />
请教各位?
请教各位?
<script type="text/javascript">
function mouseover(element)
{
element.style.backgroundImage= 'url(.....)';
}
</script> <input type="button" onmouseover="mouseover(this)"/>
把你的input换成 a标签
JS 代码都不用写了
改变的样式写在a:hover里面
//发送图片鼠标滑过
$("#sendBtn_pic").mouseover(
function (){
$(this).attr("background","../source/image/fs_0.jpg");
}
);
//发送图片鼠标离开
$("#sendBtn_pic").mouseout(
function (){
$(this).attr("background","../source/image/fs.jpg");
}
);
谁知道非IE怎么支持背景音乐啊?
而且你的写法也是可以的,自己加一句alert()测试下事件有否执行吧