Flash
Description:
Demo:
Source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function flashBgColor(lastcolor, speed, mtimes, func, count) {
if(!count) { count = 0; }
if(!func) { func = ""; }
var currentcolor = "";
if(count > mtimes && mtimes != -1) {
currentcolor = lastcolor;
} else {
var colorstr = "0123456789ABCDEF";
currentcolor = "#";
for(i=0; i<6; i++) { currentcolor += colorstr.charAt((Math.random()*16)); }
}
document.bgColor = currentcolor;
if(count > mtimes && mtimes != -1) {
if(func) eval(func);
} else {
setTimeout("flashBgColor('" +lastcolor+ "'," +speed+ "," +mtimes+ ",\"" +func +"\"," +(count+1)+ ")", speed);
}
}
flashBgColor("#ffffff", 30, 15); //flashBgColor("最後の色・背景色", スピード, 切り替え回数)
//-->
</script>
</body>
</html>
Advice:
Arrangement:
Browser:
Internet Explorer3.0以上
Netscape Navigator3.0以上