<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>js自动切换显示div</title>
<script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<style>
</style>
</head>
<body>
<div id="d1">
<div class="c1">
<iframe src="https://blog.csdn.net/" width="960px" height="960px" frameborder="no" name="" scrolling="no"> </iframe>
</div>
<div class="c1">
<iframe src="http://u2000.onlinewebshop.net" width="960px" height="960px" frameborder="no" name="" scrolling="no"> </iframe>
</div>
<div class="c1">
<iframe src="https://www.baidu.com" width="960px" height="960px" frameborder="no" name="" scrolling="no"> </iframe>
</div>
</div>
<script>
$(function() {
var i = 0;
$(".c1").eq(0).show().siblings().hide();
setInterval(function() {
i++;
if (i == 3) {
i = 0;
}
$(".c1").eq(i).show().siblings().hide();
}, 1000);
});
</script>
</body>
</html>