日期:2014-05-16 浏览次数:20490 次
<script language="javascript" type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time<8)
{
total = 0
for(i=100;i<=200;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
else if (time>=8 && time<18)
{
total = 0
for(i=100;i<=600;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
else if (time>=18 && time<21)
{
total = 0
for(i=100;i<=400;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
else
{
total = 0
for(i=100;i<=300;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
</script>
<script language="javascript" type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time<8)
{
total = 0
for(i=100;i<=200;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
else if (time>=8 && time<18)
{
total = 0
for(i=100;i<=600;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
else if (time>=18 && time<21)
{
total = 0
for(i=100;i<=400;i++)
{num=Math.random();
total +=num}
average = total
average = Math.round(average)
document.write("<h1>"+average+"</h1>")
}
else
{
total = 0
for(i=100;i<=300;i++)
{num=Math.random();
total +=num}
average = total