Haz de Gratisss tu página de inicio
Ahora su cuenta  E-mail Gratisss

             

Busca en la web

 

Scripts Reloj-Calendario

Reloj -Calendario para barra de Status 

Ejemplo: asi se vera en su pagina. Observa la Barra de Status inferior.  Los botones sirven para activarlo. Parar-Limpiar

Simplemente copia y pega el siguiente código dentro de HEAD> <HEAD, asi de simple. 

<SCRIPT>
<!-- Comienzo del reloj-calendario en la barra de Status
// Este y otros JavaScripts
// en http://www.gratisss.bizland.com

// Variables para el tiempo.
var timerID = null;
var timerRunning = false;

// Llamada para onLoad y BODY tag, en el boton reanudar.
function startclock () 
{
//Estar seguro que el reloj se detendra
stopclock();
time();
}

// Para reloj.
function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function time ()
{
var now = new Date();
var yr = now.getYear();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1;
var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
var ampm = (now.getHours() >= 12) ? " P.M." : " A.M."
var hours = now.getHours();
hours = ((hours > 12) ? hours - 12 : hours);

var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();

var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();

if(dName==1) Day = "Domingo";
if(dName==2) Day = "Lunes";
if(dName==3) Day = "Martes";
if(dName==4) Day = "Miercoles";
if(dName==5) Day = "Jueves";
if(dName==6) Day = "Viernes";
if(dName==7) Day = "Sabado";

if(mName==1) Month="Enero";
if(mName==2) Month="Febrero";
if(mName==3) Month="Marzo";
if(mName==4) Month="Abril";
if(mName==5) Month="Mayo";
if(mName==6) Month="Junio";
if(mName==7) Month="Julio";
if(mName==8) Month="Agosto";
if(mName==9) Month="Septiembre";
if(mName==10) Month="Octubre";
if(mName==11) Month="Noviembre";
if(mName==12) Month="Deciembre";

// Muestra la fecha presente.

var DayDateTime=(" "
+ Day
+ " "
+ Month
+ " "
+ dayNr
+ ", "
+ " del "
+ yr
+ " "
+ hours
+ minutes
+ seconds
+ " "
+ ampm
);

// Muestra el dia fecha y hora en la barra de Status.
window.status=DayDateTime;
timerID = setTimeout("time()",1000);
timerRunning = true;
}
// Detiene el reloj y limpia la barra de status.
function clearStatus()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
window.status=" "; 
}
// Deactivate Cloaking -->
</SCRIPT>


Este codigo puedes Pegarlo donde quieras dentro del documento, ya que son los botones que activan el reloj.


<TABLE BORDER=0 WIDTH=350>
<TR>
<TD align="center"><INPUT TYPE="button" value="Parar" onClick="stopclock()"> 

<TD align="center"><INPUT TYPE="button" value="Reanudar" onClick="startclock()">
<TD align="center"><INPUT TYPE="button" value="Limpiar" onClick="clearStatus()">
</TR>
</TABLE>

 

Hit Counter visitas desde el 10 de Enero del 2000.

Enviar correo electrónico a 130351@netexpress.cl con preguntas o comentarios sobre este sitio Web.
Copyright © 1999 Gratisss.bizland.com
Última modificación: 03 de June de 2000