美文网首页
2019-06-26

2019-06-26

作者: HupuJRs001 | 来源:发表于2019-06-28 10:49 被阅读0次

1. XMLHttpRequest

创建Date对象的4种方式

new Date();
new Date(milliseconds);
new Date(dateString);
new Date(year, month, day, hour, minutes, seconds, ms);
// 世界时间 UTC GMT(格林威治标准时间
)

Date 方法
getTimezoneOffset() 返回当前日期的本地表示和UTC表示时间之间相差的分钟数
setTime() 使用毫秒的格式 设置一个date对象的值
new Date().toDateString() // "Thu Jun 27 2019"
new Date().toJSON() // "2019-06-27T02:38:35.765Z"
new Date().toLocaleDateString() // "2019/6/27"

JavaScript 错误类型
ReferenceError(引用错误)
TypeError

相关文章

网友评论

      本文标题:2019-06-26

      本文链接:https://www.haomeiwen.com/subject/ifhkcctx.html