Código:
y en el HTML:<script Language="JavaScript"> <!-- var hoy = new Date(); var mes = hoy.getMonth()+1; var anio = hoy.getYear(); var dia = hoy.getDate(); if(dia<10) dia = "0" + dia; if(mes<10) mes= "0" + mes; if(year<1000) year+=1900; document.elForm.datum.value=((hoy.getMonth()+1) + "/" + hoy.getDate() + "/" + (anio+"").substring(2,4)); //--> </script>
Código:
Y me extraña que si le estoy especificando al JS que el valor de "datum" es el resultado de las variables de arriba, pues nada que me despliega el dato... Que estare haciendo mal aqui?<body> <form action="" id="elForm" name="elForm" method="post"> El valor es: <input type="text" name="datum" size="20"> </form> </body>
Gracias por adelantado
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)