- MomentJS 教程
- MomentJS - 主頁
- MomentJS - 概述
- MomentJS - 環境設定
- MomentJS - 簡介
- MomentJS - 解析日期和時間
- MomentJS - 日期驗證
- MomentJS - 獲取器/設定器
- 操作日期和時間
- 格式化日期和時間
- MomentJS - 日期查詢
- MomentJS - 國際化
- MomentJS - 自定義
- MomentJS - 時段
- MomentJS - 實用程式
- MomentJS - 外掛
- MomentJS - 示例
- MomentJS 有用資源
- MomentJS - 快速指南
- MomentJS - 有用資源
- MomentJS - 討論
MomentJS - 毫秒
此方法將獲取/設定毫秒。要設定毫秒,它會從 0-999 範圍內獲取值,如果該範圍超出了,則將加到秒數中。
語法
moment().millisecond(Number); moment().millisecond(); moment().milliseconds(Number); moment().milliseconds();
示例 1
var m = moment().millisecond();
輸出
示例 2
var m = moment().millisecond(555);
輸出
momentjs_getter_setter.htm
廣告