How to write today date using javascript
<html>
<body>
Today date is :
<script>
var meses = new Array ("01","02","03","04","05","06","07","08","09","10","11","12");
var diasSemana = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
var f=new Date();
var today = (diasSemana[f.getDay()] + ", " + f.getDate() + "/" +meses[f.getMonth()] + "/" + f.getFullYear());
document.write(today);
</script>
</body>
</html>
Top comments (0)