Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you add colour to the today.getDay function??

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have currently added the date to my web page and need to know how to change the colour of the text in which it appears. Can anyone help???
 
Simple HTML...

Code:
<script language=&quot;javascript&quot;>
 var d = new Date();
 var dte = &quot;&quot;
 dte += (d.getMonth() + 1) + &quot;/&quot;;
 dte += d.getDate() + &quot;/&quot;;
 dte += d.getYear();
 document.write(&quot;Today's Date: <font color='#ff0000'>&quot; + dte + &quot;</font>&quot;);
</script>

Later, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top