document.getElementById("").style.visibility = "visible"; document.getElementById("").style.visibility = "hidden";指定できるのは"visible"、"hidden"、"collapse"のいずれかです。
<html> <head> <title></title> </head> <body> <input type="button" value="消すボタン(hidden)" id="1" onclick="a()"> <input type="button" value="消えるボタン" id="2" > <input type="button" value="戻すボタン" id="3" onclick="b()"> <input type="button" name="button1" value="消すボタン(collapse)" id="4" onclick="c();" > <script language="JavaScript"> <!-- function a(){ document.getElementById("2").style.visibility = "hidden"; } function b(){ document.getElementById("2").style.visibility = "visible"; } function c(){ document.getElementById("2").style.visibility = "collapse"; } // --> </script> </body></html>