help s javascriptem

From: bj (bjservis@atlas.cz)
Date: 06. 07. 2000, 21:53 CEST


potreboval bych pomoc s javascriptem, kteremu temer vubec nerozumim...

...mam scriptik na odpocet od urciteho datumu a casu a chci se zeptat
jestli je i jiny zpusob vyplyvnuti, nez skrz "form" ?


*************
<html>
<head>
<title>odpocet</title>
<script>
<!--
function odpocitavani()
{
  dnes=new Date();

  hodin=dnes.getHours();
  minut=dnes.getMinutes();
  sekund=dnes.getSeconds();
  mesicu=dnes.getMonth();
  dni=dnes.getDate();
  roku=dnes.getYear();

  zustava_hodin=23-hodin;
  zustava_minut=59-minut;
  zustava_sekund=59-sekund;
  zustava_dni=31-dni;
  zustava_mesicu=11-mesicu;
  zustava_roku=2000-roku;

  celkem=zustava_roku
  +" roku, "+zustava_mesicu
  +" mesicu, "+ zustava_dni+" dni, "+zustava_hodin
  +" hodin, "+zustava_minut+" minut, "+zustava_sekund
  +" sekund";

 document.odpocitavadlo.odpocet.value=celkem;
 setTimeout("odpocitavani()",1000);
}
// -->
</script>
</head>
<body onLoad="odpocitavani();">
<form name="odpocitavadlo">
<b>Za jak dlouho bude rok 2001 ?</b><br>
<input type="text" name="odpocet" size="45">
</form>
</body>
</html>
**************



caj

bj

<some days goes to hell more quickly then others.....>
<ajsikju  pet  sest  nula  devet  tri  osum  nula  osum>



This archive was generated by hypermail 2.1.2 : 04. 09. 2001, 02:52 CEST