Định nghĩa Date getUTCMilliseconds() trong JavaScript

Phương thức date getUTCMilliseconds() trong Javascript trả về mili giây của ngày đã cho theo Universal time. Giá trị được trả về bởi getUTCMilliseconds() là một số integer giữa 0 và 999.

Cú pháp Date getUTCMilliseconds() trong JavaScript

Cú pháp của nó như sau:

  • Date.getUTCMilliseconds()

Trả về giá trị

  • Trả về mili giây của ngày đã cho theo Universal time.

Ví dụ minh họa Date getUTCMilliseconds() trong JavaScript

<html>
   <head>
      <title>JavaScript getUTCMilliseconds Method</title>
   </head>

   <body>

      <script type="text/javascript">
         var dt = new Date();
         document.write("getUTCMilliseconds() : " + dt.getUTCMilliseconds() ); 
      </script>

   </body>
</html>

Kết quả

getUTCMilliseconds() : 206

Viết câu trả lời

Drop Images

0 Bình luận