Javascript examples for DOM HTML Element:Input Button
Hide and show an element with button click
<html lang="en"> <head></head> <body translate="no"> <div id="theMessage"> Here goes your form </div> <button onclick="showMsg();">show</button> <button onclick="hideMsg();">hide</button> <script> var element = document.getElementById("theMessage"); function showMsg(){/*from w ww. j a v a2s . c o m*/ element.style.visibility = "visible"; } function hideMsg() { element.style.visibility = "hidden"; } </script> </body> </html>