<!DOCTYPE html>
<html>
<head>
<script>
var time;
function init(){
//获取div里面的东西
time=setInterval("show()",3000);
setInterval("show1()",3000);
}
var num=1;
function show1(){
if(num>3){
num=1;
}
var imageObj=document.getElementById("divshow1");
imageObj.src="img/"+ num++ +".jpg";
}
function show(){
var divshow = document.getElementById("divshow");
divshow.style.display="none";
clearInterval(time);
time =setInterval("hidden()",3000)
}
function hidden(){
var divshow=document.getElementById("divshow");
divshow.style.display="block";
clearInterval(time);
time =setInterval("show()",1000)
}


</script>
</head>

<body onload="init()">
<div /></div>
</body>
</html>

相关文章:

  • 2021-07-23
  • 2021-08-27
  • 2021-11-29
  • 2021-04-28
  • 2021-11-22
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-11-22
  • 2021-12-27
  • 2021-03-28
  • 2022-12-23
相关资源
相似解决方案