Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

display date in javascript

<button onclick="displayDate()">The time is?</button>

<script>
function displayDate() {
  document.getElementById("demo").innerHTML = Date();
}
</script>
Source by phoenixnap.com #
 
PREVIOUS NEXT
Tagged: #display #date #javascript
ADD COMMENT
Topic
Name
6+7 =