鼠标点击a标签,改变a标签的背景图片,js代码怎么写

鼠标点击a标签,改变a标签的背景图片,js代码怎么写


css样式

#head #baner #boke_tou #Nav dt a{
display: block;
float: left;
line-height: 1.8pc;
text-align: left;
font-size: 13px;
color: #989898;
height: 26px;
width: 241px;
margin:0px;
padding-left: 40px;
overflow: hidden;
cursor:pointer;
background-image: url(images/index1111111111_07.gif);
background-repeat: repeat-x;

}

#head #baner #boke_tou #Nav dt a:hover {
background-image: url(images/index_hover07.gif);
background-repeat: no-repeat;
display: block;
float: left;
height: 26px;
width: 240px;
}
点击下一个a标签,原先那个a标签恢复原来的背景
jquery可以闹纤么液悔仿?
$("#Nav a").click(function(){$(this).css("background-image","图片前誉URL")});
← 上一篇: 下一篇: →