![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
13/02/2002, 15:11
|
| | Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 24 años Puntos: 0 | |
Re: Fecha y hora dentro de una funcion!!!??? Hola!! Para poner la fecha dentro de esa ventana hacé lo siguiente:
Dentro del BODY de la página principal poné el siguiente código:
<pre>
var dayEspArray = new Array("Domingo","Lunes"," Martes","Miércoles","Jueves&qu ot;,"Viernes","Sábado");
var monthEspArray = new Array("Enero","Febrero"," Marzo","Abril","Mayo",&qu ot;Junio","Julio","Agosto" ;,"Septiembre","Octubre"," ;Noviembre","Diciembre");
var mydate = new Date();
var year = mydate.getYear();
if (year < 1000)
year+=1900;
var day = mydate.getDay();
var month = mydate.getMonth();
var daym = mydate.getDate();
if (daym < 10)
daym="0"+daym;
month++;
var fechaDia = dayEspArray[day] + " " + daym + " de " + monthEspArray[month] + " de " + year;
</pre>
Luego, dentro de la función (antes de cerrar with (newwin.document){) agregá la siguiente línea donde quieras que se muetre la fecha:
<pre> write("<p><small><font color='000000' face='Arial'>"+fechaDia + "</font></small>");
</pre>
<hr noshade size=1><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">bet[/CODE] |