网站首页
高清电影
无损音乐
游戏攻略
电脑教程
破解资源
站长资源
软件下载
javascript背景颜色按时变换
(编辑:jimmy 日期: 2024/10/14 浏览:
2
)
<head>
</head>
<body onload="setcolor()" >
<div id=mydiv style="font:12px sans-serif;width:300px;height:200px;">背景色测试</div>
<script>
function setcolor()
{
var colorString;
do{
colorString="#"+Math.floor(Math.random()*Math.pow(2,24)).toString(16);
}
while (colorString.length<7);
document.getElementById("mydiv").style.backgroundColor=colorString;
setTimeout(setcolor,100);
}
</script>
</body>
背景色测试
[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
上一篇:
脚本分析、压缩、混淆工具 JSA新版本发布,压缩效率提高大约10%
下一篇:
js在客户端验证密码强度,兼容FireFox和IE
最新资源
白嘉倩.1992-我有我【星工厂】【WAV+CUE】
黎明.2006-LOOKING【东亚唱片】【WAV+CUE】
群星.1986-国语金曲尽精英【瑞成】【WAV+CUE】
長渕剛《Blood》[FLAC/分轨][299.09MB]
群星《歌手2024 第4期》[320K/MP3][107.39MB]
群星《歌手2024 第4期》[FLAC/分轨][563.76MB]
RiffKitten-ChaosParade(2024)[24-44,1]FLAC
RuneKlakegg-Nattevandrer(2024)[24-96]\FLAC
赖冰霞.2006-金嗓典藏辑2IN1(南方金点系列)2CD【
群星.1988-国语金曲尽精英VOL.2【瑞成】【WAV+C
首页
音乐
电影
资源