アットウィキロゴ

背景色のフェードアウト


<html>
<head>
<script type="text/javascript">
cnt = 0;
function fadeBgColor(targetID) {
  pat = 'fedcba9876543210'
  pat = '0123456789abcdef'
  itv = 100;
  c = pat.charAt(cnt++);
  document.getElementById(targetID).style.backgroundColor ="#"+c+c+c+c+c+c
  if(cnt < pat.length)
  setTimeout("fadeBgColor('" + targetID+ "')",itv);
  if(cnt == pat.length)cnt = 0;
}
</script>
</head>
<body id="all" onLoad="fadeBgColor('all')">
<div>
<h1>fade out</h1>
</div>
</body>
</html>
最終更新:2006年11月17日 10:59