32
rated 0 times
[
35]
[
3]
/ answers: 1 / hits: 16611
/ 15 Years ago, thu, february 25, 2010, 12:00:00
I would like the button on my web page to toggle the visibility of my two check-boxes.
How do I go about implementing such functionality?
<html>
<head>
<script language=javascript>
function validate(chk){
if (chk.style.visibility == 'visible')
chk.style.visibility = 'hidden';
else
chk.style.visibility = 'visible';
}
</script>
</head>
<body>
<form><span id=t style.visibility=visible >
<input type=checkbox name=chk1>Please Check Me</span>
<input type=checkbox name=chk1>Please Check Me</span>
<p><input type=button value=check onclick=return validate(t);>
</form>
</body>
</html>
More From » html