Monday, October 20, 2008

How to make a "div" visible / invisible using javascript ?

Hi,
This is Bimlesh.if you are worrying about visibility of a div than here is your solution !
==>
step. 1
//get the id of the div.
var id= document.getElementById("divId");
step. 2
// There r 2 methods......
// Method First.
id.style.display = "none"; //to hide it
id.style.display = "block"; //to show it
or
//Method Second.
id.style.visibility = "hidden"; //to hide it
id.style.visibility = "visible"; //to show it

No comments: