首页 > 学院 > 开发设计 > 正文

getUTCMilliseconds 方法

2019-11-17 06:03:20
字体:
来源:转载
供稿:网友

 

返回 Date 对象中用全球标准时间 (UTC)表示的毫秒值。

dateObj.getUTCMilliseconds()

必选项 dateObj 参数为 Date 对象。

说明

要获取用本地时间表示的毫秒数,请使用 getMilliseconds 方法。

返回的毫秒值的范围是 0-999。

示例

下面这个例子说明了 getUTCMilliseconds 方法的用法。

function UTCTimeDemo(){   var d, s = "当前全球标准时间 (UTC) : ";   var c = ":";   d = new Date();   s += d.getUTCHours() + c;   s += d.getUTCMinutes() + c;   s += d.getUTCSeconds() + c;   s += d.getUTCMilliseconds();   return(s);}


上一篇:toTimeString 方法

下一篇:getUTCMinutes 方法

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表