<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>变色div</title>
<style>
<script>
var colors=Array("#ffff00","#ff3300","#ff3399","#ff00ff","#99ff00","#66ffff","#33ff33","#00ff33","#0000cc","#990099","#000000","#996600","#0000ff","#666699","#6699ff","#006600","#ff9966","#cc0033","#ccffff","#99ff00","#ccff00","#ffcc00","#330000");
function changecolor()
{
index=Math.floor(Math.random()*colors.length);
document.getElementById("a").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("b").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("c").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("d").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("e").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("f").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("g").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("h").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("i").style.backgroundColor=colors[index];
}
setTimeout("changecolor()",500);
window.onload=show();
</script>
.da{
width:790px;
height:895px;
}
.a{
height:40px;
width:400px;
background-color:#99ff00;
margin-left:30px;
float:left;
}
.i{
height:410px;
width:40px;
background-color:#00ffff;
margin-right:10px;
margin-bottom:-10px;
float:right;
}
.cc{
height:40px;
width:800px;
}
.b{
height:359px;
width:40px;
background-color:#990099;
margin-bottom:-9px;
margin-left:390px;
}
.aa{
height:40px;
float:left;
margin-left:30px;
}
.c{
height:40px;
width:350px;
background-color:#993300;
float:left;
margin-top:10px;
}
.d{
height:40px;
width:40px;
background-color:#ffff00;
margin-left:10px;
margin-top:10px;
float:left;
}
.e{
height:40px;
width:350px;
background-color:#ff0000;
margin-left:10px;
margin-top:10px;
float:left;
}
.bb{
height:440px;
float:left;
}
.f{
height:440px;
width:40px;
background-color:#0033cc;
margin-left:30px;
margin-top:10px;
float:left;
}
.blank2{
width:320px;
height:400px;
float:left;
}
.g{
height:390px;
width:40px;
margin-top:20px;
background-color:#ff3399;
float:left;
}
.h{
width:400px;
height:40px;
margin-top:410px;
background-color:#00ff00;
margin-left:390px;
}
</style>
</head>
<body>
<div class="da">
<div class="cc">
<div class="a"></div>
<div class="i"></div>
</div>
<div class="b"></div>
<div class="aa">
<div class="c"></div>
<div class="d"></div>
<div class="e"></div>
</div>
<div class="bb">
<div class="f"></div>
<div class="blank2"></div>
<div class="g"></div>
<div class="h"></div>
</div>
</div>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>变色div</title>
<style>
<script>
var colors=Array("#ffff00","#ff3300","#ff3399","#ff00ff","#99ff00","#66ffff","#33ff33","#00ff33","#0000cc","#990099","#000000","#996600","#0000ff","#666699","#6699ff","#006600","#ff9966","#cc0033","#ccffff","#99ff00","#ccff00","#ffcc00","#330000");
function changecolor()
{
index=Math.floor(Math.random()*colors.length);
document.getElementById("a").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("b").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("c").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("d").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("e").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("f").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("g").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("h").style.backgroundColor=colors[index];
index=Math.floor(Math.random()*colors.length);
document.getElementById("i").style.backgroundColor=colors[index];
}
setTimeout("changecolor()",500);
window.onload=show();
</script>
.da{
width:790px;
height:895px;
}
.a{
height:40px;
width:400px;
background-color:#99ff00;
margin-left:30px;
float:left;
}
.i{
height:410px;
width:40px;
background-color:#00ffff;
margin-right:10px;
margin-bottom:-10px;
float:right;
}
.cc{
height:40px;
width:800px;
}
.b{
height:359px;
width:40px;
background-color:#990099;
margin-bottom:-9px;
margin-left:390px;
}
.aa{
height:40px;
float:left;
margin-left:30px;
}
.c{
height:40px;
width:350px;
background-color:#993300;
float:left;
margin-top:10px;
}
.d{
height:40px;
width:40px;
background-color:#ffff00;
margin-left:10px;
margin-top:10px;
float:left;
}
.e{
height:40px;
width:350px;
background-color:#ff0000;
margin-left:10px;
margin-top:10px;
float:left;
}
.bb{
height:440px;
float:left;
}
.f{
height:440px;
width:40px;
background-color:#0033cc;
margin-left:30px;
margin-top:10px;
float:left;
}
.blank2{
width:320px;
height:400px;
float:left;
}
.g{
height:390px;
width:40px;
margin-top:20px;
background-color:#ff3399;
float:left;
}
.h{
width:400px;
height:40px;
margin-top:410px;
background-color:#00ff00;
margin-left:390px;
}
</style>
</head>
<body>
<div class="da">
<div class="cc">
<div class="a"></div>
<div class="i"></div>
</div>
<div class="b"></div>
<div class="aa">
<div class="c"></div>
<div class="d"></div>
<div class="e"></div>
</div>
<div class="bb">
<div class="f"></div>
<div class="blank2"></div>
<div class="g"></div>
<div class="h"></div>
</div>
</div>
</body>
</html>