- Forums
- Javascipt
- How To Make A Div Hidden Or Visiable Javascript
today i was lost, so i am posting here so incase someone else has the same question [2217], Last Updated: Mon Jun 24, 2024
Hostman
Mon Mar 29, 2010
1 Comments
466 Visits
today i was lost, so i am posting here so in case someone else has the same question.
i wanted to know how to make a div visible or hidden, you can use something like this
lets say i have an input in a form that looks like this
<input type="text" id="Button" name="Button" value="Send" onclick"HideButton(1);">
br>
as you can see, when you click on the button, it calls the HideButton function which in turns tells your browser to hide the input field
you can use this function to make it work
function HideButton(Hide){
if(Hide == 1){
document.getElementById('SendButton').style.visibility = "hidden";
}else{
document.getElementById('SendButton').style.visibility = "visible";
}
}
you can modify this to change the input to a div
http://www.plus2net.com/javascript_tutorial/hide-layer2.php
https://www.webune.com/forums/20100329ccrc.html