
18/01/2012, 17:55
|
 | Moderador | | Fecha de Ingreso: abril-2002 Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 11 meses Puntos: 1284 | |
Respuesta: "Extensión" de clase Hola:
Tal vez te sirva usar "prototype"... un ejemplo:
Código:
Date.prototype.toString = function() {
Meses = ["enero","febrero","marzo","abril","mayo","junio",
"julio","agosto","septiembre","octubre","noviembre","diciembre"];
return this.getDate() + "/" + Meses[this.getMonth()] + "/" + this.getFullYear() + " | " + this.getHours() + ":" + this.getMinutes();
}
Saludos
__________________ Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo |