JavaScript中的getMilliseconds()方法使用詳解
更新時間:2015年06月10日 10:00:51 投稿:goldensun
這篇文章主要介紹了JavaScript中的getMilliseconds()方法使用詳解,是JS入門學習中的基礎(chǔ)知識,需要的朋友可以參考下
javascript Date.getMilliseconds()方法按照本地時間返回指定日期的毫秒數(shù)。通過getMilliseconds返回的是一個介于0和999的值。
語法
Date.getMilliseconds()
下面是參數(shù)的詳細信息:
- NA
返回值:
按照本地時間返回指定日期的毫秒數(shù)。
例子:
<html>
<head>
<title>JavaScript getMilliseconds Method</title>
</head>
<body>
<script type="text/javascript">
var dt = new Date( );
document.write("getMilliseconds() : " + dt.getMilliseconds() );
</script>
</body>
</html>
這將產(chǎn)生以下結(jié)果:
getMilliseconds() : 578
相關(guān)文章
js中parseFloat(參數(shù)1,參數(shù)2)定義和用法及注意事項
今天在看jquery時用到了parseFloat(第一個參數(shù),10),對這兩個參數(shù)很是疑惑,于是整理搜集了一下,曬出來與大家分享,希望本文對你有所幫助,感興趣的朋友可以了解下2013-01-01

