Ir para conteúdo
Fórum Script Brasil
  • 0

Contagem


Dezinh0

Pergunta

3 respostass a esta questão

Posts Recomendados

  • 0

Dezinho.. pega ai.. se foi mal atendido.. por favor reclame com os Administradores do Forum..

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
    <TITLE>Calendrio regressivo  Autor : jair.issa@linksat.com.br - Desenvolvimento de Sistemas</TITLE>
</HEAD>

<BODY TEXT="black" BGCOLOR="#99CCFF" LINK="#0000FF" VLINK="#0000FF" onLoad="startclock()">

<P><script language="JavaScript">
<!-- 
var timerID = null;
var timerRunning = false;
function stopclock (){
        if(timerRunning)
                clearTimeout(timerID);
        timerRunning = false;
}

function startclock () {
        stopclock();
        showtime();
}


function showtime () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds();
        var date = now.getDate();
        var month = now.getMonth() + 1;
        var year = now.getYear();
        var timeValue = "" + ((hours < 10 ) ? "0" : "") + hours
        // var timeValue = "" + ((hours >12) ? hours -12 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        // timeValue += (hours >= 12) ? " P.M." : " A.M."

         if (seconds == 0) {
    window.status = "Novo minuto!";
    document.clock.face.value = "Novo minuto!";
         }
        if (minutes == 0 && seconds == 0) {
    window.status = "Nova hora!";
    document.clock.face.value = "Nova hora!";
    
         }
        if (hours == 0 && minutes == 0 && seconds == 0) {
    window.status = "Noite!";
    document.clock.face.value = "Noite!";
         }

       else if (seconds > 0) {
    document.clock.face.value = timeValue + "  " + date + "/" +  month + "/" + year;    
    window.status = timeValue + "  O relógio está cincronizado com o relógio de seu computador!     "  + date + "/" + month + "/" + year;
                }

        nextXmas = new Date("December 25, 2003")
        nextXmas.setYear(now.getYear())
        msPerDay = 24 * 60 * 60 * 1000; // Numeros de milisegundos por dia 
        daysLeft = (nextXmas.getTime() - now.getTime()) / msPerDay;
        daysLeft = Math.round(daysLeft);
        document.Frame2.Xmas.value =  daysLeft + " dias úteis para o Natal!";
        
        nextXmas = new Date("December 31, 2003")
        nextXmas.setYear(now.getYear())
        msPerDay = 24 * 60 * 60 * 1000; 
        daysLeft = (nextXmas.getTime() - now.getTime()) / msPerDay;
        daysLeft = Math.round(daysLeft);
        document.Frame3.NewYear.value = daysLeft + " dias úteis para o Ano Novo!";
                    
        nextXmas = new Date("September 7, 2004")
        msPerDay = 24 * 60 * 60 * 1000; 
        daysLeft = (nextXmas.getTime() - now.getTime()) / msPerDay;
        daysLeft = Math.round(daysLeft);
        document.Frame4.Niver.value =  daysLeft + " dias para comemoração de 7 de Setembro";

        nextXmas = new Date("October 12, 2004")
        msPerDay = 24 * 60 * 60 * 1000; 
        daysLeft = (nextXmas.getTime() - now.getTime()) / msPerDay;
        daysLeft = Math.round(daysLeft);
        document.Frame5.Oktober.value =  daysLeft + " dias para o Dia das Crianças"

        
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
}
// -->
</SCRIPT></P>
<P ALIGN="CENTER"><B><FONT SIZE="5" COLOR="red" FACE="Times New Roman">
Calendário</FONT></B></P>
<P>
<CENTER>
<P>
<TABLE BORDER="0" WIDTH="477" HEIGHT="280" BGCOLOR="#FFCC00">
    <TR>
  <TD BGCOLOR="#0066FF">
      <P ALIGN="CENTER"><FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="clock" onSubmit="0"> <B>
              <FONT
      SIZE="2" FACE="Verdana">Data e hor&aacute;rio</FONT></B><font face="Verdana"><font size="2"><BR>
     </font>
      <input type="textarea" name="face" size=20 value="Java"></font></P>

      <P ALIGN="CENTER">      </FORM>
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="Frame2" onSubmit="0"> <B>
  <FONT SIZE="2"
      FACE="Verdana">Faltam</FONT></B><font face="Verdana"><font size="2"><BR>
      </font>
      <input type="textarea" name="Xmas" size=50 value="Java"><font size="2">
  </font></font>    </FORM>
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="Frame3" onSubmit="0"> 
  <font face="Verdana"> <input type="textarea" name="NewYear" size=50 value="JavaScript"><font size="2">
  </font></font>
      </FORM>
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="Frame4" onSubmit="0"> 
  <font face="Verdana"> <input type="textarea" name="Niver" size=50 value="JavaScript"><font size="2">
  </font></font>
      </FORM>
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="Frame5" onSubmit="0"> 
  <font face="Verdana"> <input type="textarea" name="Oktober" size=50 value="JavaScript"><font size="2">
  </font></font>
  </TD>
    </TR>
</TABLE>
</P>
</CENTER>
<SPAN STYLE="Position : Relative; Left : 0px; Top : 0px; Width : 150px; Height : 160px">
<P ALIGN="CENTER">
    <P>
    <CENTER>
<p></p>
</CENTER>
    <P>
</SPAN>
<P>
</FORM>

</BODY>

</HTML>

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...