Monday, March 30, 2009

hide and display html controls

document.getElementById('div1').style.display="block";
document.getElementById('div2').style.display="none";
//you can use the following also
//document.getElementById("div1").style.visibility = 'visible';
//document.getElementById("div2").style.visibility = 'hidden';

No comments: