मिलीसेकंड में वर्तमान समय प्राप्त करने के लिए getMilliseconds() मेथड का उपयोग करें। JavaScript का getMilliseconds() मेथड स्थानीय समय के अनुसार निर्दिष्ट तिथि में मिलीसेकंड लौटाता है। getMilliseconds() द्वारा लौटाया गया मान 0 और 999 के बीच एक संख्या होती है।
उदाहरण
मिलीसेकंड में वर्तमान समय प्राप्त करने के लिए निम्न कोड चलाएं:
<html>
<head>
<title>JavaScript getMilliseconds() Method</title>
</head>
<body>
<script>
var dt = new Date();
document.write("getMilliseconds() : " + dt.getMilliseconds());
</script>
</body>
</html>