Answers for "how to make javascript make things disappear"

1

how to make javascript make things disappear

<html>
<script type="text/javascript">
<!--
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
//-->
</script>
<body>
<a href="#" onclick="toggle_visibility('foo');">Click here</a>
<div id="foo">This is foo</div>
</body>
</html>
Posted by: Guest on December-13-2020

Code answers related to "how to make javascript make things disappear"

Code answers related to "Javascript"

Browse Popular Code Answers by Language