摘要:
JavaScript内置函数:Date时间<script> var today=new Date(); weeks=["日","一","二","三","四","五","六"];//用于显示星期几 document.write(today+"<br/>");//输出当前时间:Fri May 03 20 阅读全文
posted @ 2019-05-03 10:22
最好的安排
阅读(638)
评论(0)
推荐(0)
摘要:
JavaScript内置函数Math.random()自定义封装函数:1,Math.floor(Math.random()*(b-a+1)+a) 随机生成a到b之间的整数。 也可以写成:Math.floor(Math.random()*(b-a+1))+a; 这样也行:Math.ceil(Math. 阅读全文
posted @ 2019-05-03 09:50
最好的安排
阅读(249)
评论(0)
推荐(0)
摘要:
<script> //string.split("-"),以字符"-"把string拆分成一个数组。返回一个数组 //array.join("-"),以字符"-"把数组array链接成一个字符串。 var str="welcome-to-school"; console.log(str.split( 阅读全文
posted @ 2019-05-03 00:25
最好的安排
阅读(344)
评论(0)
推荐(0)

浙公网安备 33010602011771号