Javascript examples for Date:getUTCMilliseconds
The getUTCMilliseconds() method returns the milliseconds (from 0 to 999), according to universal time.
UTC time is the same as GMT time.
None
A Number, from 0-999, representing milliseconds
The following code shows how to return the milliseconds, according to UTC:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww.ja va 2 s. c o m*/ var d = new Date("July 21, 2020 01:15:00:195"); var n = d.getUTCMilliseconds(); document.getElementById("demo").innerHTML = n; } </script> </body> </html>