摘要: 1.随机数生成的相关函数Math.random(),该函数返回一个0-1之间的小数Math.floor(num),该函数返回小于或等于指定数字的最大整数Math.ceil(num),该函数返回大于或等于指定数字的最大整数在实际应用中可以通过:var randomNum=Math.floor(Math.random()*10);来生成0-10之间的随机数。2.定时执行相关任务的函数function testTime(){ document.getElementById("testtime").innerHTML=""+Math.floor(Math.ran 阅读全文
posted @ 2013-08-30 10:02 刘水香 阅读(138) 评论(0) 推荐(0) 编辑