|
| JAVASCRIPT Date() CONSTRUCTOR FUNCTION
The Date() constructor function is used to get the date and time of the system, which is really from the user's computer. First, a new date object must be created and then this can be used to display the date and time.
Example:
<script type="text/javascript">
var date_time_now= new Date();
document.write(date_time_now);
</script>
The above will display:
This is the date and time from your computer's internal system clock.
See Also:
|
|