<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function cs(){
document.bgColor='red';
}
function dd(){
document.bgColor='yellow';
}
function ddd(){
document.bgColor='#2222';
}
</script>
</head>
<body>
<p>这是一个可以切换背景色的简单JavaScript代码.</p>
<form name="form1">
<input type="button" name="read" value="红色" οnclick="cs()" />
<input type="button" name="yellow" value="黄色" οnclick="dd()"/>
<input type="button" name="#2222" value="墨绿色" οnclick="ddd()"/>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function cs(){
document.bgColor='red';
}
function dd(){
document.bgColor='yellow';
}
function ddd(){
document.bgColor='#2222';
}
</script>
</head>
<body>
<p>这是一个可以切换背景色的简单JavaScript代码.</p>
<form name="form1">
<input type="button" name="read" value="红色" οnclick="cs()" />
<input type="button" name="yellow" value="黄色" οnclick="dd()"/>
<input type="button" name="#2222" value="墨绿色" οnclick="ddd()"/>
</form>
</body>
</html>