摘要: ①定义字符串 var str=xxxx" 例:var str='abcdeabcde' ②字符串长度 console.log(str.length) ③字符串下标从0开始,最后一个下标是str.length-1 通过下标获取 例:str[0] 或str.charAt(0) ④ 1,str.index 阅读全文
posted @ 2018-11-30 21:33 江苏丶刘德华 阅读(173) 评论(0) 推荐(0) 编辑
摘要: new Date(年,月,日) //月份+1 console.log(+new Date() )//返回1970年1月1日到现在的毫秒数 其他几种形式:console.log(new Date().getTime()) console.log(Date.now()) console.log(new 阅读全文
posted @ 2018-11-30 20:41 江苏丶刘德华 阅读(986) 评论(0) 推荐(0) 编辑