Javascript hide a div

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>

Related Sourcecode

More Sourcecode

×
Google login
SignUp with Email
X