61,112
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function test(obj){
document.getElementsByTagName("body")[0].style.cssText = "background:"+obj.style.background ;
}
</script>
</HEAD>
<BODY>
选择配色:
<input type="button" value="" style="background:red" onclick="test(this)" />
<input type="button" value="" style="background:blue" onclick="test(this)" />
<input type="button" value="" style="background:yellow" onclick="test(this)" />
</BODY>
</HTML>