Lequinho
10-17-2003, 03:19 PM
Hi, help me please, i need to put this javascript (It shows the date, but it is in portuguese, but that's not the problem) in my .png file:
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","Segunda","Terça","Quarta","Quinta","Sexta","Sábado")
var montharray=new
Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro")
document.write("<small><font color='000000' face='Arial' size='2'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" , "+year+"</b></font></small>"),
but at the last line (document.write....) , the program says that the document is not defined.
I'm just a beginner i don't know how to define it.
Can someone tell me how will the code look like?
Help me please
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","Segunda","Terça","Quarta","Quinta","Sexta","Sábado")
var montharray=new
Array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro")
document.write("<small><font color='000000' face='Arial' size='2'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" , "+year+"</b></font></small>"),
but at the last line (document.write....) , the program says that the document is not defined.
I'm just a beginner i don't know how to define it.
Can someone tell me how will the code look like?
Help me please