打开页面时背景色的渐变效果
发布时间:2008-12-20 阅读数: 次 来源:网乐原科技
要完成此效果需要两个步骤
第一步:把如下代码加入到区域中
<script Language="JavaScript">
function BgColor()
{
var x = 0, step = 1
while( x <= 0xffffff)
{
document.bgColor = x
x += step
step <<= 8
if( step >= 0x1000000) step = 1
}
}
BgColor()
</script>
第二步:把“onLoad="BgColor()"”加在标记里
例如: