Date: date, month, and year.
/* Note that the getMonth method returns 0 in January, 1 in February etc.
So add 1 to the getMonth method to display the correct date.
*/
<html>
<body>
<script type="text/javascript">
var d = new Date()
document.write(d.getDate())
document.write(".")
document.write(d.getMonth() + 1)
document.write(".")
document.write(d.getFullYear())
</script>
</body>
</html>
Related examples in the same category