html:
<img class="shuaxin" src="../static/img/break.png">
js:
$(".shuaxin").click(function(){
$(this).attr("src","../static/img/dongtai.gif");
});
setInterval(function(){
// console.log(123)
$(".shuaxin").attr("src","../static/img/break.png");
},3000);
jquery点击切换图标(比如刷新图标,静态变动态图片)
最新推荐文章于 2024-04-29 16:11:31 发布