Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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>
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to call create react app 
Javascript :: es6 
Javascript :: Codewars Beginner - Reduce but Grow 
Javascript :: javascript full screen 
Javascript :: how to check if url has hash in react 
Javascript :: moment get time am pm 
Javascript :: allow only letters javascript 
Javascript :: how to update angular version 
Javascript :: document queryselector click event 
Javascript :: nestjs cli create project 
Javascript :: truncate function react 
Javascript :: js array into object 
Javascript :: js stop scrolling event 
Javascript :: get response from form jquery 
Javascript :: uuid for react native 
Javascript :: console regex 
Javascript :: change display style onclick 
Javascript :: javascript convert int to float with 2 decimal places 
Javascript :: discord.js message on member add 
Javascript :: js create script tag request 
Javascript :: datatables typeerror k is undefined 
Javascript :: setattribute disabled javascript 
Javascript :: discord.js join voice channel 
Javascript :: javascript trigger click on element 
Javascript :: how to prepare key in object dyamically javascript 
Javascript :: set nested state react hooks spread operator 
Javascript :: grepper valid base64 
Javascript :: byte to kb javascript 
Javascript :: jquery move element 
Javascript :: postman scripts check variable exists 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =