js实现简单的轮播效果

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
function init(){
setInterval("changelunbo()",1000);
}
var i = 1;
function changelunbo(){
i++;
var imgE = document.getElementById("lunbo");
imgE.src = "img/2."+i+".jpg";
if(i == 4){
i = 0;
}
}
</script>
</head>
<body onload="init()">
<img src="img/2.1.jpg"/ id="lunbo">
</body>
</html>
上一篇:error MSB6006: “CL.exe”已退出,代码为X —— 的解决办法


下一篇:Linux版MonoDevelop无法连接调试器的解决方案(Could not connet to the debugger)