<html>
<head>
<title> Unique Font Switcher </title>
<script type="text/javascript" language="JavaScript">
var fontStyles = new Array ( "cooper","Fixedsys","Edwardian Script ITC", "Gill Sans MT", "Kozuka Gothic Pro", "Lucida Sans", "Adobe Gothic Std", "Adobe Naskh", "Algerian","Arial Unicode MS");
function changeFont()
{
head6.style.fontFamily = fontStyles[ Math.floor( Math.random * 10 ) ];
}
</script>
</head>
<body>
<center>
<h1 onmouseover="changeFont()" onmouseout="changeFont()" id="head6" > Click here to switch fonts </h1>
</center>
</body>
In an attempt to update the font style upon hovering over or out, using
head6.style.fontFamily = fontStyles[3]
did not work with the defined array.