JavaScript Tutorial/Date/valueOf

Материал из Web эксперт
Перейти к: навигация, поиск

Date.valueOf()

This method returns the equivalence of the Date object in milliseconds.

The milliseconds are expressed as an integer representing the number of milliseconds between midnight January 1, 1970 (GMT) to the date and time specified in the Date object.



<html>
    <script language="JavaScript">
    <!--
    theDate = new Date();
    document.write(theDate.valueOf());
    -->
    </script>
</html>