Eklablog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

Tutorial, CSS, HTML

 

Reloj calendario estático Un estupendo reloj con día, mes, año y nos indica si es de día o de noche.

<CENTER><SCRIPT LANGUAGE="JAVASCRIPT"> 
<!-- Begin Digital Watch 
document.write('<!-- Begin Hiding Script -->') 
/* 
###################################################################### 
################ SCRIPT BY BURNBLADE ##################### 
################ Visit My Site At ##################### 
################ http://www.burning.net ##################### 
################ © copywrite 1997 ##################### 
modificado por www.creatupropiaweb.com 
This script may be used as long as the above lines are not changed 
in any way. 
*/ 
var watchID = null 
var watchRun = false 
function stopwatch(){ 
if(watchRun) 
clearTimeout(watchID) 
watchRun = false 

function startwatch(){ 
stopwatch() 
dayTime() 


function dayTime() { 
day = new Date(); 
hour = day.getHours(); 
minute = day.getMinutes(); 
second = day.getSeconds(); 

if (hour > 12) { 
hours = hour - 12; 
part = 'Del Dia'} 
else { 
part = 'De la Noche'; 
if (hour == 0) { 
hours = 12 

else { 
hours = hour 


if (minute < 10) {minutes = 0} 
else {minutes = ""} 
if (second < 10) {seconds = 0} 
else {seconds =""} 
date = ('' +"Mes "+(day.getMonth() + 1)+" Dia "+day.getDate()+ " del año "+day.getYear()+ ''); 
time = ('' + hours + ":"+minutes+""+minute+ ":"+seconds+""+second+ '') 
parts = ('' +part+ '') 
document.timedate.time.value = time 
document.timedate.date.value = date 
document.timedate.parts.value = parts 
watchID = setTimeout("dayTime()",1000) 
watchRun = true 

document.write('<!-- End Hiding Script -->') 
// End Digital Watch--> 
</script> 

<BODY onLoad="startwatch()"> 
<form name="timedate" onSubmit="0"> 
<table cellspacing=0 cellpadding=0> 
<tr align=center> 
<td><INPUT TYPE="text" NAME="time" SIZE=6 VALUE ="..Starti"></td> 
<td><INPUT TYPE="text" NAME="parts" SIZE=12 VALUE ="ng.."></td> 
<td colspan=2><INPUT TYPE="text" NAME="date" SIZE=28 VALUE ="........"></td> 
</tr> 
</table> 
</form></CENTER> 
<!-- Simba says Roar. --> 
Retour à l'accueil
Partager cet article
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article