Gustavo Vilela de Carvalho wrote:
  Yes.  I have the following script :

            <script language="JavaScript">
var agora = new Date();
var anoN = agora.getYear()
var mesN = agora.getMonth() + 1;
var diaNr = ((agora.getDate()<10) ? "0" : "")+ agora.getDate();
if(mesN==1) mes="janeiro";
if(mesN==2) mes="fevereiro";
if(mesN==3) mes="março";
if(mesN==4) mes="abril";
if(mesN==5) mes="maio";
if(mesN==6) mes="junho";
if(mesN==7) mes="julho";
if(mesN==8) mes="agosto";
if(mesN==9) mes="setembro";
if(mesN==10) mes="outubro";
if(mesN==11) mes="novembro";
if(mesN==12) mes="dezembro";
if (anoN<1900) anoN += 1900;
var DiaHoje =("Campinas, "+diaNr+" de "+mes+" de "+anoN);
document.write(DiaHoje);

</script>

two things: in xhtml, script is pcdata, not cdata as in html, which means you have to escape > to &gt; and < to &lt;

http://javascript.about.com/library/blxhtml.htm

also, document.write() does not work in xhtml.

http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to