How can I make a button invisible by clicking another button in HTML?
I have written like below, but it doesn't work.
<input type="button" onclick="demoShow();" value="edit" />
<script type="text/javascript">
function demoShow()
{ document.getElementsByName('p2').style.visibility="hidden"; }
</script>
<input id="p2" type="submit" value="submit" name="submit" />
write this
To hide
{document.getElementById("p2").style.display="none";}
to show
{document.getElementById("p2").style.display="block";}