<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-">
<meta name="viewport" content="width=device-width, initial-scale=.">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style type="text/css">
.set_bg_con{
width:px;
height:px;
border:px solid #ddd;
margin:px auto ;
background-color:#fff
}
.set_text{
line-height:px;
float:left;
margin: px px;
color:#;
}
.style,.style,.style,.style,.style,.style{
width:px;
height:px;
float:left;
margin:px px;
background: gold;
cursor:pointer;
}
.style{
background:#cc;
}
.style{
background:#bf;
}
.style{
background:#ef;
}
.style{
background:#fc;
}
.style{
background:#e;
}
.style{
background:#eeb;
}
</style>
<script type="text/javascript">
window.onload = function(){
var oBtn = document.getElementById('c');
var oBtn = document.getElementById('c');
var oBtn = document.getElementById('c');
var oBtn = document.getElementById('c');
var oBtn = document.getElementById('c');
var oBtn = document.getElementById('c');
var oBody = document.getElementById('body')
oBtn.onclick = function(){
oBody.style.backgroundColor = '#cc';
}
oBtn.onclick = function(){
oBody.style.backgroundColor = '#bf';
}
oBtn.onclick = function(){
oBody.style.backgroundColor = '#ef';
}
oBtn.onclick = function(){
oBody.style.backgroundColor = '#fc';
}
oBtn.onclick = function(){
oBody.style.backgroundColor = '#e';
}
oBtn.onclick = function(){
oBody.style.backgroundColor = '#eeb';
}
}
</script>
</head>
<body id="body">
<div class="set_bg_con">
<div class="set_text">请选择网页的背景色:</div>
<div class="style" id="c"></div>
<div class="style" id="c"></div>
<div class="style" id="c"></div>
<div class="style" id="c"></div>
<div class="style" id="c"></div>
<div class="style" id="c"></div>
</div>
</body>
</html>