Write a JavaScript code which return today’s date including date and Time.
CODING:
<html>
<head>
<script>
function date(){
document.getElementById("here").innerHTML = Date();
}
</script>
</head>
<body>
Click Me To Display Date & Time!<br>
<input type="button" value="click me" onClick="date()">
<h1 id="here"></h1>
</body>
</html>
CODING:
<html>
<head>
<script>
function date(){
document.getElementById("here").innerHTML = Date();
}
</script>
</head>
<body>
Click Me To Display Date & Time!<br>
<input type="button" value="click me" onClick="date()">
<h1 id="here"></h1>
</body>
</html>
Comments
Post a Comment