我编制了这个倒计时。如何控制页面上显示的最大div数。示例:Thare在页面上有20个倒计时,但只有5个向用户显示(可见)。
编辑:现在页面上有19个倒计时显示,我该怎么设置 在页面上显示最多7倒计时?
这是代码:
<html>
<head>
<meta charset="utf-8">
<title>Tramvaj.info</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<link rel="shortcut icon" type="image/png" href="favi.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<style type="text/css">
html, body {
height: 100%;
margin: 0;
overflow-x: hidden;
overflow-y: auto;
padding: 0;
width: 100%;
background-image: url("bg.jpg");
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
}
#header_container { background:#1f62a7; border:0px solid #1f62a7; height:35px; left:0; position:relative; width:100%; top:0; }
#headermenu {
width:100%;
height:100%;
position:relative;
top:-8px;
background-color: rgba(255,255,255,0.6);
}
.headermenu {
width: 150px;
height: 26px;
padding-top:15px;
display: block;
float: left;
text-align: center;
text-decoration: none!important;
text-transform: uppercase;
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
font-weight: 400;
font-size: 15px;
letter-spacing: 2px;
color: #ffffff!important;
transition: all .5s ease;
}
#page-wrap { width: 230px; margin: 50px auto; padding: 20px; background: white; -moz-box-shadow: 0 0 20px black; -webkit-box-shadow: 0 0 20px black; box-shadow: 0 0 20px black; }
p { font: 30px/2 Georgia, Serif; margin: 0 0 30px 0; text-indent: 40px; }
a { color: inherit;
text-decoration: none;
}
#dani1Box, #sati1Box, #minute1Box, #sekunde1Box, #dani2Box, #sati2Box, #minute2Box, #sekunde2Box, #dani3Box, #sati3Box, #minute3Box, #sekunde3Box, #dani4Box, #sati4Box, #minute4Box, #sekunde4Box,
#dani5Box, #sati5Box, #minute5Box, #sekunde5Box, #dani6Box, #sati6Box, #minute6Box, #sekunde6Box, #dani7Box, #sati7Box, #minute7Box, #sekunde7Box, #dani8Box, #sati8Box, #minute8Box, #sekunde8Box,
#dani9Box, #sati9Box, #minute9Box, #sekunde9Box, #dani10Box, #sati10Box, #minute10Box, #sekunde10Box, #dani11Box, #sati11Box, #minute11Box, #sekunde11Box, #dani12Box, #sati12Box, #minute12Box, #sekunde12Box, #dani1Box, #sati13Box, #minute13Box, #sekunde13Box, #dani14Box, #sati14Box, #minute14Box, #sekunde14Box, #dani15Box, #sati15Box, #minute15Box, #sekunde15Box, #dani16Box, #sati16Box, #minute16Box, #sekunde16Box, #dani17Box, #sati17Box, #minute17Box, #sekunde17Box, #dani18Box, #sati18Box, #minute18Box, #sekunde18Box, #dani19Box, #sati19Box, #minute19Box, #sekunde19Box, #dani20Box, #sati20Box, #minute20Box, #sekunde20Box{
font-size:25px;
color:#1f62a7;
font-family:Sans-serif;
display: inline-block;
}
</style>
</head>
<body>
<div id="header_container">
<div id="header"></div>
<div align="center">
<div id="headermenu">
<a href="stanice.html" class="headermenu">SVE STANICE</a>
<a href="about.html" class="headermenu">HOME</a>
</div>
</div>
<div id="page-wrap">
<script>
var d = new Date();
var n = d.getDay();
//if(n == 1 || n == 2 || n == 3 || n == 4 || n == 5){
var timer1;
function cdtd1() {
var sad1 = new Date();
var dolazak1 = new Date(sad1.getFullYear(),sad1.getMonth(),sad1.getDate(),18,00,00);
var timeDiff1 = dolazak1.getTime() - sad1.getTime();
if (timeDiff1 <= 0) {
clearInterval(timer1);
$("#Box1").remove();
}
var sekunde1 = Math.floor(timeDiff1 / 1000);
var minute1 = Math.floor(sekunde1 / 60);
var sati1 = Math.floor(minute1 / 60);
var dani1 = Math.floor(sati1 / 24);
sati1 %= 24;
minute1 %= 60;
sekunde1 %= 60;
$("#dani1Box").html(dani1);
$("#sati1Box").html('7-Dubrava ' + sati1 + ':');
$("#minute1Box").html(minute1 + ':');
$("#sekunde1Box").html(sekunde1);
timer1 = setTimeout(cdtd1, 1000);
}
$(document).ready(function() {
cdtd1();
});
//--------------------------------------------------------------------------------------------------
var timer2;
function cdtd2() {
var sad2 = n
ew Date();
var dolazak2 = new Date(sad2.getFullYear(),sad2.getMonth(),sad2.getDate(),18,00,00);
var timeDiff2 = dolazak2.getTime() - sad2.getTime();
if (timeDiff2 <= 0) {
clearInterval(timer2);
$("#Box2").remove();
}
var sekunde2 = Math.floor(timeDiff2 / 1000);
var minute2 = Math.floor(sekunde2 / 60);
var sati2 = Math.floor(minute2 / 60);
var dani2 = Math.floor(sati2 / 24);
sati2 %= 24;
minute2 %= 60;
sekunde2 %= 60;
$("#dani2Box").html(dani2);
$("#sati2Box").html('7-Dubrava ' + sati2 + ':');
$("#minute2Box").html(minute2 + ':');
$("#sekunde2Box").html(sekunde2);
timer2 = setTimeout(cdtd2, 1000);
}
$(document).ready(function() {
cdtd2();
});
//----------------------------------------------------------------------------------
var timer3;
function cdtd3() {
var sad3 = new Date();
var dolazak3 = new Date(sad3.getFullYear(),sad3.getMonth(),sad3.getDate(),18,00,00);
var timeDiff3 = dolazak3.getTime() - sad3.getTime();
if (timeDiff3 <= 0) {
clearInterval(timer3);
$("#Box3").remove();
}
var sekunde3 = Math.floor(timeDiff3 / 1000);
var minute3 = Math.floor(sekunde3 / 60);
var sati3 = Math.floor(minute3 / 60);
var dani3 = Math.floor(sati3 / 24);
sati3 %= 24;
minute3 %= 60;
sekunde3 %= 60;
$("#dani3Box").html(dani3);
$("#sati3Box").html('7-Dubrava ' + sati3 + ':');
$("#minute3Box").html(minute3 + ':');
$("#sekunde3Box").html(sekunde3);
timer3 = setTimeout(cdtd3, 1000);
}
$(document).ready(function() {
cdtd3();
});
//-----------------------------------------------------------------------------------------
var timer4;
function cdtd4() {
var sad4 = new Date();
var dolazak4 = new Date(sad4.getFullYear(),sad4.getMonth(),sad4.getDate(),18,00,00);
var timeDiff4 = dolazak4.getTime() - sad4.getTime();
if (timeDiff4 <= 0) {
clearInterval(timer4);
$("#Box4").remove();
}
var sekunde4 = Math.floor(timeDiff4 / 1000);
var minute4 = Math.floor(sekunde4 / 60);
var sati4 = Math.floor(minute4 / 60);
var dani4 = Math.floor(sati4 / 24);
sati4 %= 24;
minute4 %= 60;
sekunde4 %= 60;
$("#dani4Box").html(dani4);
$("#sati4Box").html('7-Dubrava ' + sati4 + ':');
$("#minute4Box").html(minute4 + ':');
$("#sekunde4Box").html(sekunde4);
timer4 = setTimeout(cdtd4, 1000);
}
$(document).ready(function() {
cdtd4();
});
var timer5;
function cdtd5() {
var sad5 = new Date();
var dolazak5 = new Date(sad5.getFullYear(),sad5.getMonth(),sad5.getDate(),18,00,00);
var timeDiff5 = dolazak5.getTime() - sad5.getTime();
if (timeDiff5 <= 0) {
clearInterval(timer5);
$("#Box5").remove();
}
var sekunde5 = Math.floor(timeDiff5 / 1000);
var minute5 = Math.floor(sekunde5 / 60);
var sati5 = Math.floor(minute5 / 60);
var dani5 = Math.floor(sati5 / 24);
sati5 %= 24;
minute5 %= 60;
sekunde5 %= 60;
$("#dani5Box").html(dani5);
$("#sati5Box").html('14-Zapruđe ' + sati5 + ':');
$("#minute5Box").html(minute5 + ':');
$("#sekunde5Box").html(sekunde5);
timer5 = setTimeout(cdtd5, 1000);
}
$(document).ready(function() {
cdtd5();
});
var timer6;
function cdtd6() {
var sad6 = new Date();
var dolazak6 = new Date(sad6.getFullYear(),sad6.getMonth(),sad6.getDate(),18,00,00);
var timeDiff6 = dolazak6.getTime() - sad6.getTime();
if (timeDiff6 <= 0) {
clearInterval(timer6);
$("#Box6")
.remove();
}
var sekunde6 = Math.floor(timeDiff6 / 1000);
var minute6 = Math.floor(sekunde6 / 60);
var sati6 = Math.floor(minute6 / 60);
var dani6 = Math.floor(sati6 / 24);
sati6 %= 24;
minute6 %= 60;
sekunde6 %= 60;
$("#dani6Box").html(dani6);
$("#sati6Box").html('7-Dubrava ' + sati6 + ':');
$("#minute6Box").html(minute6 + ':');
$("#sekunde6Box").html(sekunde6);
timer6 = setTimeout(cdtd6, 1000);
}
$(document).ready(function() {
cdtd6();
});
var timer7;
function cdtd7() {
var sad7 = new Date();
var dolazak7 = new Date(sad7.getFullYear(),sad7.getMonth(),sad7.getDate(),18,00,00);
var timeDiff7 = dolazak7.getTime() - sad7.getTime();
if (timeDiff7 <= 0) {
clearInterval(timer7);
$("#Box7").remove();
}
var sekunde7 = Math.floor(timeDiff7 / 1000);
var minute7 = Math.floor(sekunde7/ 60);
var sati7 = Math.floor(minute7 / 60);
var dani7 = Math.floor(sati7 / 24);
sati7 %= 24;
minute7 %= 60;
sekunde7 %= 60;
$("#dani7Box").html(dani7);
$("#sati7Box").html('14-Zapruđe ' + sati7 + ':');
$("#minute7Box").html(minute7 + ':');
$("#sekunde7Box").html(sekunde7);
timer7 = setTimeout(cdtd7, 1000);
}
$(document).ready(function() {
cdtd7();
});
var timer8;
function cdtd8() {
var sad8 = new Date();
var dolazak8 = new Date(sad8.getFullYear(),sad8.getMonth(),sad8.getDate(),18,00,00);
var timeDiff8 = dolazak8.getTime() - sad8.getTime();
if (timeDiff8 <= 0) {
clearInterval(timer8);
$("#Box8").remove();
}
var sekunde8 = Math.floor(timeDiff8 / 1000);
var minute8 = Math.floor(sekunde8 / 60);
var sati8 = Math.floor(minute8 / 60);
var dani8 = Math.floor(sati8 / 24);
sati8 %= 24;
minute8 %= 60;
sekunde8 %= 60;
$("#dani8Box").html(dani8);
$("#sati8Box").html('14-Zapruđe ' + sati8 + ':');
$("#minute8Box").html(minute8 + ':');
$("#sekunde8Box").html(sekunde8);
timer8 = setTimeout(cdtd8, 1000);
}
$(document).ready(function() {
cdtd8();
});
var timer9;
function cdtd9() {
var sad9 = new Date();
var dolazak9 = new Date(sad9.getFullYear(),sad9.getMonth(),sad9.getDate(),18,00,00);
var timeDiff9= dolazak9.getTime() - sad9.getTime();
if (timeDiff9 <= 0) {
clearInterval(timer9);
$("#Box9").remove();
}
var sekunde9 = Math.floor(timeDiff9/ 1000);
var minute9 = Math.floor(sekunde9/ 60);
var sati9= Math.floor(minute9 / 60);
var dani9= Math.floor(sati9/ 24);
sati9 %= 24;
minute9 %= 60;
sekunde9 %= 60;
$("#dani9Box").html(dani9);
$("#sati9Box").html('14-Zapruđe ' + sati9 + ':');
$("#minute9Box").html(minute9 + ':');
$("#sekunde9Box").html(sekunde9);
timer9 = setTimeout(cdtd9, 1000);
}
$(document).ready(function() {
cdtd9();
});
var timer10;
function cdtd10() {
var sad10 = new Date();
var dolazak10 = new Date(sad10.getFullYear(),sad10.getMonth(),sad10.getDate(),18,00,00);
var timeDiff10 = dolazak10.getTime() - sad10.getTime();
if (timeDiff10 <= 0) {
clearInterval(timer10);
$("#Box10").remove();
}
var sekunde10 = Math.floor(timeDiff10/ 1000);
var minute10 = Math.floor(sekunde10 / 60);
var sati10 = Math.floor(minute10 / 60);
var dani10 = Math.floor(sati10/ 24);
sati10 %= 24;
minute10 %= 60;
sekunde10 %= 60;
$("#dani10Box").html(dani10);
$("#sati10Box").html('14-Zapruđe ' + sati10 + ':');
$("#minute10Box").html(minute10 + ':');
$("#sekunde10Box").html(sekunde10);
timer10 = setTimeout(cdtd10, 1000);
}
$(document).ready(function() {
cdtd10();
});
var timer11;
function cdtd11() {
var sad11 = new Date();
var dolazak11 = new Date(sad11.getFullYear(),sad11.getMonth(),sad11.getDate(),18,00,00);
var timeDiff11 = dolazak11.getTime() - sad11.getTime();
if (timeDiff11 <= 0) {
clearInterval(timer11);
$("#Box11").remove();
}
var sekunde11 = Math.floor(timeDiff11 / 1000);
var minute11 = Math.floor(sekunde11 / 60);
var sati11 = Math.floor(minute11 / 60);
var dani11 = Math.floor(sati11 / 24);
sati11 %= 24;
minute11 %= 60;
sekunde11 %= 60;
$("#dani11Box").html(dani11);
$("#sati11Box").html('7-Dubrava ' + sati11 + ':');
$("#minute11Box").html(minute11 + ':');
$("#sekunde11Box").html(sekunde11);
timer11 = setTimeout(cdtd11, 1000);
}
$(document).ready(function() {
cdtd11();
});
var timer12;
function cdtd12() {
var sad12 = new Date();
var dolazak12 = new Date(sad12.getFullYear(),sad12.getMonth(),sad12.getDate(),18,00,00);
var timeDiff12 = dolazak12.getTime() - sad12.getTime();
if (timeDiff12 <= 0) {
clearInterval(timer12);
$("#Box12").remove();
}
var sekunde12 = Math.floor(timeDiff12 / 1000);
var minute12 = Math.floor(sekunde12 / 60);
var sati12 = Math.floor(minute12 / 60);
var dani12 = Math.floor(sati12 / 24);
sati12 %= 24;
minute12 %= 60;
sekunde12 %= 60;
$("#dani12Box").html(dani12);
$("#sati12Box").html('7-Dubrava ' + sati12 + ':');
$("#minute12Box").html(minute12 + ':');
$("#sekunde12Box").html(sekunde12);
timer12 = setTimeout(cdtd12, 1000);
}
$(document).ready(function() {
cdtd12();
});
var timer13;
function cdtd13() {
var sad13 = new Date();
var dolazak13 = new Date(sad13.getFullYear(),sad13.getMonth(),sad13.getDate(),18,00,00);
var timeDiff13 = dolazak13.getTime() - sad13.getTime();
if (timeDiff13 <= 0) {
clearInterval(timer13);
$("#Box13").remove();
}
var sekunde13 = Math.floor(timeDiff13 / 1000);
var minute13 = Math.floor(sekunde13 / 60);
var sati13 = Math.floor(minute13 / 60);
var dani13 = Math.floor(sati13 / 24);
sati13 %= 24;
minute13 %= 60;
sekunde13 %= 60;
$("#dani13Box").html(dani13);
$("#sati13Box").html('7-Dubrava ' + sati13 + ':');
$("#minute13Box").html(minute13 + ':');
$("#sekunde13Box").html(sekunde13);
timer13 = setTimeout(cdtd13, 1000);
}
$(document).ready(function() {
cdtd13();
});
var timer14;
function cdtd14() {
var sad14 = new Date();
var dolazak14 = new Date(sad14.getFullYear(),sad14.getMonth(),sad14.getDate(),18,00,00);
var timeDiff14 = dolazak14.getTime() - sad14.getTime();
if (timeDiff14 <= 0) {
clearInterval(timer14);
$("#Box14").remove();
}
var sekunde14 = Math.floor(timeDiff14 / 1000);
var minute14 = Math.floor(sekunde14 / 60);
var sati14 = Math.floor(minute14 / 60);
var dani14 = Math.floor(sati14 / 24);
sati14 %= 24;
minute14 %= 60;
sekunde14 %= 60;
$("#dani14Box").html(dani14);
$("#sati14Box").html('7-Dubrava ' + sati14 + ':');
$("#minute14Box").html(minute14 + ':');
$("#sekunde14Box").html(sekunde14);
timer14 = setTimeout(cdtd14, 1000);
}
$(document).ready(function() {
cdtd14();
});
var timer15;
function cdtd15() {
var sad15 = new Date();
var dolazak15 = new Date(sad15.getFullYear(),sad15.getMonth(),sad15.getDate(),18,00,00);
var timeDiff15 = dolazak15.getTime() - sad15.getTime();
if (timeDiff15 <= 0) {
clearInterval(timer15);
$("#Box15").remove();
}
var sekunde15 = Math.floor(timeDiff15 / 1000);
var minute15 = Math.floor(sekunde15 / 60);
var sati15 = Math.floor(minute15 / 60);
var dani15 = Math.floor(sati15 / 24);
sati15 %= 24;
minute15 %= 60;
sekunde15 %= 60;
$("#dani15Box").html(dani15);
$("#sati15Box").html('7-Dubrava ' + sati15 + ':');
$("#minute15Box").html(minute15 + ':');
$("#sekunde15Box").html(sekunde15);
timer15 = setTimeout(cdtd15, 1000);
}
$(document).ready(function() {
cdtd15();
});
var timer16;
function cdtd16() {
var sad16 = new Date();
var dolazak16 = new Date(sad16.getFullYear(),sad16.getMonth(),sad16.getDate(),18,00,00);
var timeDiff16 = dolazak16.getTime() - sad16.getTime();
if (timeDiff16 <= 0) {
clearInterval(timer16);
$("#Box16").remove();
}
var sekunde16 = Math.floor(timeDiff16 / 1000);
var minute16 = Math.floor(sekunde16 / 60);
var sati16 = Math.floor(minute16 / 60);
var dani16 = Math.floor(sati16 / 24);
sati16 %= 24;
minute16 %= 60;
sekunde16 %= 60;
$("#dani16Box").html(dani16);
$("#sati16Box").html('7-Dubrava ' + sati16 + ':');
$("#minute16Box").html(minute16 + ':');
$("#sekunde16Box").html(sekunde16);
timer16 = setTimeout(cdtd16, 1000);
}
$(document).ready(function() {
cdtd16();
});
var timer17;
function cdtd17() {
var sad17 = new Date();
var dolazak17 = new Date(sad17.getFullYear(),sad17.getMonth(),sad17.getDate(),18,00,00);
var timeDiff17 = dolazak17.getTime() - sad17.getTime();
if (timeDiff17 <= 0) {
clearInterval(timer17);
$("#Box17").remove();
}
var sekunde17 = Math.floor(timeDiff17 / 1000);
var minute17 = Math.floor(sekunde17 / 60);
var sati17 = Math.floor(minute17 / 60);
var dani17 = Math.floor(sati17 / 24);
sati17 %= 24;
minute17 %= 60;
sekunde17 %= 60;
$("#dani17Box").html(dani17);
$("#sati17Box").html('7-Dubrava ' + sati17 + ':');
$("#minute17Box").html(minute17 + ':');
$("#sekunde17Box").html(sekunde17);
timer17 = setTimeout(cdtd17, 1000);
}
$(document).ready(function() {
cdtd17();
});
var timer18;
function cdtd18() {
var sad18 = new Date();
var dolazak18 = new Date(sad18.getFullYear(),sad18.getMonth(),sad18.getDate(),18,00,00);
var timeDiff18 = dolazak18.getTime() - sad18.getTime();
if (timeDiff18 <= 0) {
clearInterval(timer18);
$("#Box18").remove();
}
var sekunde18 = Math.floor(timeDiff18 / 1000);
var minute18 = Math.floor(sekunde18 / 60);
var sati18 = Math.floor(minute18 / 60);
var dani18 = Math.floor(sati18 / 24);
sati18 %= 24;
minute18 %= 60;
sekunde18 %= 60;
$("#dani18Box").html(dani18);
$("#sati18Box").html('7-Dubrava ' + sati18 + ':');
$("#minute18Box").html(minute18 + ':');
$("#sekunde18Box").html(sekunde18);
timer18 = setTimeout(cdtd18, 1000);
}
$(document).ready(function() {
cdtd18();
});
var timer19;
function cdtd19() {
var sad19 = new Date();
var dolazak19 = new Date(sad19.getFullYear(),sad19.getMonth(),sad19.getDate(),18,00,00);
var timeDiff19 = dolazak19.getTime() - sad19.getTime();
if (timeDiff19 <= 0) {
clearInterval(timer19);
$("#Box19").remove();
}
var sekunde19 = Math.floor(timeDiff19 / 1000);
var minute19 = Math.floor(sekunde19 / 60);
var sati19 = Math.floor(minute19 / 60);
var dani19 = Math.floor(sati19 / 24);
sati19 %= 24;
minute19 %= 60;
sekunde19 %= 60;
$("#dani19Box").html(dani19);
$("#sati19Box").html('7-Dubrava ' + sati19 + ':');
$("#minute19Box").html(minute19 + ':');
$("#sekunde19Box").html(sekunde19);
timer19 = setTimeout(cdtd19, 1000);
}
$(document).ready(function() {
cdtd19();
});
//}
</script>
<center>
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:2px;"> </h1>
<div id="Box1">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati1Box"></div>
<div id="minute1Box"></div>
<div id="sekunde1Box"></div>
</div>
<div id="Box2">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati2Box"></div>
<div id="minute2Box"></div>
<div id="sekunde2Box"></div>
</div>
<div id="Box3">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati3Box"></div>
<div id="minute3Box"></div>
<div id="sekunde3Box"></div>
</div>
<div id="Box4">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati4Box"></div>
<div id="minute4Box"></div>
<div id="sekunde4Box"></div>
</div>
<div id="Box5">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati5Box"></div>
<div id="minute5Box"></div>
<div id="sekunde5Box"></div>
</div>
<div id="Box6">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati6Box"></div>
<div id="minute6Box"></div>
<div id="sekunde6Box"></div>
</div>
<div id="Box7">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati7Box"></div>
<div id="minute7Box"></div>
<div id="sekunde7Box"></div>
</div>
<div id="Box8">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati8Box"></div>
<div id="minute8Box"></div>
<div id="sekunde8Box"></div>
</div>
<div id="Box9">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati9Box"></div>
<div id="minute9Box"></div>
<div id="sekunde9Box"></div>
</div>
<div id="Box10">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati10Box"></div>
<div id="minute10Box"></div>
<div id="sekunde10Box"></div>
</div>
<div id="Box11">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati11Box"></div>
<div id="minute11Box"></div>
<div id="sekunde11Box"></div>
</div>
<div id="Box12">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati12Box"></div>
<div id="minute12Box"></div>
<div id="sekunde12Box"></div>
</div>
<div id="Box13">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati13Box"></div>
<div id="minute13Box"></div>
<div id="sekunde13Box"></div>
</div>
<div id="Box14">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati14Box"></div>
<div id="minute14Box"></div>
<div id="sekunde14Box"></div>
</div>
<div id="Box15">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati15Box"></div>
<div id="minute15Box"></div>
<div id="sekunde15Box"></div>
</div>
<div id="Box16">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati16Box"></div>
<div id="minute16Box"></div>
<div id="sekunde16Box"></div>
</div>
<div id="Box17">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati17Box"></div>
<div id="minute17Box"></div>
<div id="sekunde17Box"></div>
</div>
<div id="Box18">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati18Box"></div>
<div id="minute18Box"></div>
<div id="sekunde18Box"></div>
</div>
<div id="Box19">
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:5px;"> </h1>
<div id="sati19Box"></div>
<div id="minute19Box"></div>
<div id="sekunde19Box"></div>
</div>
<h1 style="font-family:Helvetica;color:#FFFFFF;font-size:2px;"> </h1>
</center>
</div>
</body>
</html>
Thanks
答案 0 :(得分:0)
不确定我是否理解您需要做什么,但您可以随时查看页面上的DIV数量
var divCount = document.getElementsByTagName('div').length;
答案 1 :(得分:0)
您可以在不想显示的div上设置display:none
,也可以在jQuery $('#element').hide();