可变背景色

建立页面如下:

<html>
<head>
<title></title>
<script language="javascript">
<!--
function changeBg(hexNumber)
{
    document.bgColor=hexNumber
}
//-->
</script>
</head>

<body>
-----------------------
<form>
<p align="center"><input type="button" value="red" onclick="changeBg('#cc0000')">
<input type="button" value="green" onclick="changeBg('#006600')">
<input type="button" value="yellow" onclick="changeBg('#ffff99')">
<input type="button" value="white" onclick="changeBg('#ffffff')">
<input type="button" value="black" onclick="changeBg('#000000')">
<input type="button" value="grey" onclick=changeBg('#666666')">
</form>
</body>