My favorites
▼
|
Sign in
lineadecodigo
Web Code Samples in spanish
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
lineadecodigo_web
/
WebContent
/
scripting
/
javascript
/
timers
/
hora-en-capa.html
r480
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Reloj en una capa</title>
<style type="text/css">
#capa_reloj {font:bold; color:yellow; background:blue; width:70px;}
</style>
<script type="text/javascript">
function mostrar() {
var dia = new Date();
var hora = dia.getHours();
var minutos = dia.getMinutes();
var segundos = dia.getSeconds();
if ((hora >= 0)&&(hora <= 9)){
hora="0"+hora;
}
if ((minutos >= 0)&&(minutos <= 9)){
minutos="0"+minutos;
}
if ((segundos >= 0)&&(segundos <= 9)){
segundos="0"+segundos;
}
time =" " + hora + ":" + minutos + ":" + segundos;
document.getElementById("capa_reloj").innerHTML = time;
window.setTimeout("mostrar()",1000);
}
</script>
</head>
<body onLoad="window.setTimeout('mostrar()',1000);">
<h1>Reloj en una capa</h1>
<div id="capa_reloj"></div>
<br><br>
<hr>
Artículo disponible en: <a href="http://lineadecodigo.com/javascript/reloj-javascript-en-una-capa/">http://lineadecodigo.com/javascript/reloj-javascript-en-una-capa/</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Codigo">lineadecodigo.com</a>
</body>
</html>
Show details
Hide details
Change log
r224
by vcuervo on Mar 8, 2010
Diff
Hora en una capa
Go to:
...ascript/timers/hora-en-capa.html
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 1315 bytes, 48 lines
View raw file
Powered by
Google Project Hosting