eclips高手进!!!!!

来源:百度知道 编辑:UC知道 时间:2024/07/03 14:05:27
用eclips编写一个程序,包含三个button,一个红,一个黄,一个蓝,分别点击,背景颜色随之变换。要求我直接复制过去就能运行的答案!

<!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=gb2312" />
<title>Untitled Document</title>
</head>
<script language="javascript">
function changecolor(colors){
document.bgColor=colors;
}
</script>
<body bgcolor="red">
<p>hello</p>
<p><input style="background-color:#FF0000" type="button" onclick="changecolor('#FF0000');" value="red" /></p>