Font array and date : JavaScript DHTML examples (example source code) » HTML » Font

JavaScript DHTML
C++
Java Products
Java Articles
JavaScript DHTML Home  »   HTML   » [  Font  ]   
 



Font array and date

Please note that some example is only working under IE or Firefox.

/*
Javascript Essentials
by Jason J. Manger

Publisher: Mcgraw-Hill Osborne Media; 

ISBN: 0078822343
*/

<html>
<head>
<script language="JavaScript">
<!--
 var dateToday = new Date();
 var thisDay   = dateToday.getDay();
 var fonts     = new Array("Albertus Medium"
                           "Times",
                           "Helvetica",
                           "Courier",
                           "Albertus Extra Bold",
                           "Script",
                           "Times");
//-->
</script>
</head>
<body>
<font size="+1" face="&{ fonts[thisDay] };">
Here is some body text that has been allocated a dynamic font face
using the new <b>face</b> attribute of the <b>&lt;font&gt;</b> tag
(introduced in Netscape Navigator beta 5).</font>
</body>
</html>
Related examples in the same category
1.  Change font size
2.  Controlling FONT Object Properties








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.