Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

on click insert into element time

<!DOCTYPE html>
<html>
<body>

<h2>My First JavaScript</h2>

<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>

<div id="demo"></div>

</body>
</html>
 
PREVIOUS NEXT
Tagged: #click #insert #element #time
ADD COMMENT
Topic
Name
9+6 =