Posted By

Tate on 11/11/08


Tagged


Versions (?)

Show/hide div on checkbox


 / Published in: JavaScript
 

URL: http://www.dynamicdrive.com/forums/showthread.php?t=27245

  1. <script type="text/javascript">
  2. <!--
  3. function showMe (it, box) {
  4. var vis = (box.checked) ? "block" : "none";
  5. document.getElementById(it).style.display = vis;
  6. }
  7. //-->
  8. </script>
  9.  
  10. <input type="checkbox" name="modtype" value="value1" onclick="showMe('div1', this)" />

Report this snippet  

You need to login to post a comment.