السلام عليكم ورحمة الله وبركاته
هذا كود استئصلته من احد المواقع يقوم بالعد التنازلي على امر معين لكن كيف يتم تحديد هذا الموضوع المعين
ارجوا منكم توضيح الطريقة وشكرا لكم ...
<script language="JavaScript1.2">
now_d = 01;
now_m = 04;
now_y = 05;
now_th = 08;
now_tm = 51;
now_ts = 17;
off_y = 05;
off_m = 04;
off_d = 01;
off_th = 11;
off_tm = 59;
off_ts = 59;
dateNow = new Date(parseInt(now_y) + 2000,parseInt(now_m) - 1,now_d,now_th,now_tm,now_ts);
dateFuture = new Date(parseInt(off_y) + 2000,parseInt(off_m) - 1,off_d,off_th,off_tm,off_ts);
amount = dateFuture - dateNow;
amount2 = amount;
function update_time() {
amount = amount2 - 1000;
amount2 = amount;
if(amount < 0){
set_inner('countdown', 'Expired!');
window.location.reload();
}else{
hrs=0;
mins=0;
secs=0;
amount = Math.floor(amount/1000);
hrs=parseInt(Math.floor(amount/3600));
amount=amount % 3600;
mins=parseInt(Math.floor(amount/60));
if (hrs < 10) hrs = '0'+hrs;
if (mins < 10) mins = '0'+mins;
amount=amount % 60;
secs=parseInt(Math.floor(amount));
if (secs < 10) secs = '0'+secs;
set_inner('countdown', hrs+':'+mins+':'+secs);
}
setTimeout('update_time()', 1000);
}
function set_inner(name, value, add){
var elem;
if (document.getElementById) elem = document.getElementById(name);
if (document.all) elem = document.all[name];
if (elem && add) elem.innerHTML += value;
if (elem && !add) elem.innerHTML = value;
}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><font color="#666666"><span class="text10b"> Offer ends in:</span></font></td>
</tr>
<tr>
<td align="center"><font color="#C50000"><span id="countdown" class="text16b">TIME</span></font><script>update_time();</script></td>
</tr>
<tr>
<td align="center">(hr:min:sec)</td>
</tr>
</table>