MomentJS - Millisecond

此方法将获取/设置毫秒。要设置毫秒,需要从 0 到 999 的值,如果超出范围,则将添加到秒数。

语法

moment().millisecond(Number);
moment().millisecond();
moment().milliseconds(Number);
moment().milliseconds();

示例 1

var m = moment().millisecond();

输出

Millisecond

示例 2

var m = moment().millisecond(555);

输出

Moment Millisecond

momentjs_getter_setter.html