Advertisement
Guest User

Javascript button

a guest
Nov 11th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -----button for javascript-----
  2. <button type="button"
  3. onclick="document.getElementById('demo').innerHTML = Date()">
  4. Click me to display Date and Time.</button>
  5.  
  6. <p id="demo"></p>
  7.  
  8. </body>
  9. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement