好菜的问题,为什么我按任何按键都无效
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript" >
function colorday()
{
a=Math.random() *8;
switch(a)
{
case 1:
document.bgcolor="red" ;
break;
case 2:
document.bgcolor="yellow" ;
break;
case 3:
document.bgcolor="blue" ;
break;
case 4:
document.bgcolor="teal" ;
break;
case 5:
document.bgcolor="salmon" ;
break;
case 6:
document.bgcolor="black" ;
break;
case 7:
document.bgcolor="grey" ;
break;
}
}
</script>
</head>
<body bgcolor="red" fgcolor="brack">
<form >
<input type="button" name="Submit" value="red" onclick='document.bgcolor="red" '>
<br>
<input type="button" name="Submit" value="green" onclick='document.bgcolor="green" '>
<br>
<input type="button" name="submit" value="asdf" onclick="colorday()">
<br>
</form>
<p></p>
</body>
</html>