发布网友 发布时间:2022-04-24 20:37
共2个回答
热心网友 时间:2022-04-23 09:21
var i=1;
function show(j)
{
document.getElementById(i1).style.display = "none";
document.getElementById(2).style.display = "none";
document.getElementById(3).style.display = "none";
document.getElementById(j).style.display = "block";
}
settimerout(function(){show(i);i++;},2000);
}
热心网友 时间:2022-04-23 10:39
function show()
{
setTimeout("changeBody(id)",1000);
}
function changeBody(index){
switch(index){
case 1:{
document.getElementById('iDBody1').style.display = "block";
document.getElementById('iDBody2').style.display = "none";
document.getElementById('iDBody3').style.display = "none";
break;
}
case 2:{
document.getElementById('iDBody1').style.display = "none";
document.getElementById('iDBody2').style.display = "block";
document.getElementById('iDBody3').style.display = "none";
break;
}
case 3:{
document.getElementById('iDBody1').style.display = "none";
document.getElementById('iDBody2').style.display = "none";
document.getElementById('iDBody3').style.display = "block";
break;
}
}
}
<body onload="show()">
</body>