Using Javascript, how do you make a label invisible on a button click?
A:
Just from the top of my head
<input type="button" onclick="document.getElementById('labelname').style.display = 'none';" />
aaronmase
2010-08-12 11:05:00
+2
A:
I'm not sure what you want but here goes:
<label id="mylabel">Woot!!</label>
button.onclick = function() {
document.getElementById("mylabel").style.display = "none";
}
naikus
2010-08-12 11:05:00
A:
A label is rendered as span tag in HTML. If you know the id of any the control you can turn off its visibility through JavaScript by
document.getElementById('your-element-id').style.display='none';
ajay_whiz
2010-08-12 11:05:20