Saved X
Google login
SignUp with Email
X

Javascript hide a div

theindreshverma ( Edited  Sep 01, 11:18 pm )
Login

Hide a div js

<body>

<div style="height:200px;width:200px;background-color:black" id="d"></div>
<a href="javascript:void(0);" onclick="hidediv()">Click me to hide div</a>

<script>
function hidediv() {
   document.getElementById('d').style.display = 'none';
}
</script>

</body>

Sourcecode Tags

More Sourcecodes

More Sourcecodes