Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<html><!DOCTYPE html> <html> <body> <p>Click the button to execute the <em>displayDate()</em> function.</p> <button onclick="displayDate()">Try it</button> <script> function displayDate() { document.getElementById("demo").innerHTML=Date(); } </script> <p id="demo"></p> </body> </html>