hide div on button click javascript
<style>
function hideDiv(){
var closedDiv = document.getElementById("closableDiv");
closedDiv.style.display = "none";
}
</style>
<button id="closableDiv" onClick="hideDiv()"> </button>
hide div on button click javascript
<style>
function hideDiv(){
var closedDiv = document.getElementById("closableDiv");
closedDiv.style.display = "none";
}
</style>
<button id="closableDiv" onClick="hideDiv()"> </button>
how to make hide/show btn in js
let btnName = document.getElementById('btnId');
btnName.addEventListener('click', ()=>{
let element = document.getElementById('elementId');
if (element.style.display != 'inline'){
element.style.display = 'inline';
}
else{
element.style.display = 'none'
}
})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us