<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var b = 0;
function demo(){
var a = document.getElementById("s");
/*
if(a.src == "../image/1.png"){
a.src="../image/2.png"
}else if(a.src == "../image/2.png"){
a.src="../image/3.png"
}else if(a.src == "../image/3.png"){
a.src="../image/1.png"
}
*/
var c = b%3+1;
a.src = "../image/"+c+".png";
b++;
}
window.setInterval("demo()",1000);
</script>
<img src="../image/1.png" id="s">
</body>
</html>
6.5轮播图
最新推荐文章于 2022-06-25 00:00:30 发布