Javascript examples for DOM HTML Element:Paragraph
Set and remove value to and from <p> element
<html> <body> <button type="button" onclick="document.getElementById('demo').innerHTML = Date()"> display Date and Time. </button> <button type="button" onclick="Empty()"> delete Date and Time. </button> <script> function Empty(){/* w w w . j a va2 s.c om*/ document.getElementById('demo').innerHTML = ""; } </script> <p id="demo"></p> </body> </html>