Moderator |
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function showhide(div, show)
{
var div = document.getElementById(div);
var display = (show) ? "block" : "none"; // "block" of "inline" - kan in principe allebei
var visibility = (show) ? "visible" : "hidden";
div.style.display = display;
div.style.visibility = visibility;
}
</script>
</head>
<body>
<form action="..." method="post">
<input type="checkbox" name="whatever" value="1" onclick="showhide('blok', this.checked)" /> klik!
<div id="blok" style="display: none; visibility: hidden">
bliep
</div>
</form>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> function showhide(div, show) { var div = document.getElementById(div); var display = (show) ? "block" : "none"; // "block" of "inline" - kan in principe allebei var visibility = (show) ? "visible" : "hidden"; div.style.display = display; div.style.visibility = visibility; } </script> </head> <body> <form action="..." method="post"> <input type="checkbox" name="whatever" value="1" onclick="showhide('blok', this.checked)" /> klik! <div id="blok" style="display: none; visibility: hidden"> bliep </div> </form> </body> </html>
Deze code spreekt redelijk voor zich, lijkt mij. |