'Date' Example : Date « Javascript Objects « JavaScript Reference
- JavaScript Reference
- Javascript Objects
- Date
'Date' Example
<html>
<body>
<script language="javascript">
function myFunction(){
var date = new Date();
alert(date.toString());
}
</script>
<button onclick="myFunction();">Today's date</button>
</body>
</html>
Related examples in the same category