Código 1:
<script languaje="JavaScript">
//<![CDATA[
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
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<b><font color='blue' face='Arial' size='3'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" del "+year+"</font></b>")
//]]>
</script>
Código 2:
<script languaje="JavaScript">
//<![CDATA[
var mydate=new Date();
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;
document.write("<b><font color='000000' face='Arial' size='3'>"+daym+"/"+month+"/"+year+"</font></b>")
//]]>
</script>
Código 3:
<script languaje="JavaScript">
//<![CDATA[
var mydate=new Date();
var year=mydate.getYear()-100;
if (year<10)
year="0"+year;
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;
document.write("<b><font color='000000' face='Arial' size='3'>"+daym+"/"+month+"/"+year+"</font></b>")
//]]>
</script>
Código 4:
<div style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGpOY0-5C1i5L49QxOwksdZxnKMDx3rcvwhHQJLGIr1G1AIPIi_0A0SyIFkyC4OotR13Q30k_y969xTtLkSDjUG3HQeA468_xxngh5EsbE8-bDxLDKVzM-IdH5fGx_i3T_c1ibwwveoIJC/s1600/reloj-fecha-actual.jpg);background-repeat: no-repeat;width:200px;height:95px;text-align: center;font-size:70px;color:#fff;padding-top:35px;"><script languaje="JavaScript">
//<![CDATA[
var mydate=new Date();
var year=mydate.getYear()-100;
if (year<10)
year="0"+year;
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;
document.write("<b><font color='ffffff' face='Arial'>"+daym+" "+month+" "+year+"</font></b>")
//]]>
</script></div>
El código 3 y 4 funciona solo en Firefox, pero igualmente pueden ver el ejemplo con el div para personalizarlo.
0 comments:
Post a Comment