Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/08/2005, 17:34
Avatar de leoj90
leoj90
Usuario baneado!
 
Fecha de Ingreso: agosto-2005
Mensajes: 1.365
Antigüedad: 19 años, 1 mes
Puntos: 0
Exclamación

Bueno, yo tambien tengo 14 años y no se mucho de Javascript. Con tu problema, pues primero te faltan los ; despues de los parentesis y te faltan los arrays para los meses, quedaria algo asi:
CODIGO ENTRE <HEAD></HEAD>:
Código HTML:
<script>

function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "am";
if (hours > 12) {
dn = "pm";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;
</script> 
CODIGO ENTRE <BODY></BODY>:
Código HTML:
months = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
now = new Date();
d = now.getDate();
m = now.getMonth();
h = now.getTime();
y = now.getYear();
document.write(d+"-"+months[m]+"-"+y); 
</script>&nbsp;<span id="clock"></span> 
Espero que te sirva!