onclick hide div javascript

<style>
	function hideDiv(){
		var closedDiv  = document.getElementById("closableDiv");
		closedDiv.style.display = "none";
	}
</style>
<button id="closableDiv" onClick="hideDiv()"> </button>

3
1
Xhr1s 100 points

                                    &lt;script type=&quot;text/javascript&quot;&gt;
function hide(id) {
	document.getElementById(id).style.display = &quot;none&quot;;
}
function show(id) {
	document.getElementById(id).style.display = &quot;&quot;;
}
&lt;/script&gt;
&lt;div id=&quot;div&quot; onclick=&quot;hide('div')&quot;&gt;
  &lt;p&gt;Click to hide!&lt;/p&gt;
&lt;/div&gt;

3 (1 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
onclick hide element js onclick show or hide button dshow hide dive onclick using js how to hide div in html on click show and hide div on button click javascript show button and hide button onclick hide and show javascript onclick comoonent hide and show js hide div on click show and hide div by a button click hide div on click onclick hide a div hide a div on button click javascript hide and display a div on button click in javascript and html hide element on click javascript onclick unclick show hide input hide things when click button js how to hide and show div on button click in javascript hide and show onclick how to make buttons to display and hide sections javascript how to make button to display and hide sections javascript js show and hide button on click show and hide element in javascript when button click how to make an object hide/show on click of a button div hide on click javascript on click hide element onbutton click hide div javascript show/hide div onclick onclick function show and hide javascript show/hide div on button click javascript hide button by id javascript hide a div element but keep in dom show hide div on button click show hide divs on button click javascript button hide and show onclick hide element javascript hide div on button click in js hide button in javascript functions onclick hide div hide div on button click javascript show hide div on button click hide or show button javascript javascript show/hide div on click how to hide button by id in javascript how to hide and show when button clicked in javascript on click hide div hide button when it is clicked javascript onclick hide button javascript hide button on click how to hide a div on button click onclick element should hide input button hide onclick javascript hidden button click javascript javascript show/hide div onclick toggle hide element event click onclick hide and show div in javascript hide and show div using javascript onclick onclick hide div javascript onclick hide in javascript hide and show div on button click using javascript when a button click hide and show div on button click using javascript show and hide button click using javascript javascript hide element on click onclick div hide how to show content on button click in javascript then hide hide div on button click javascript
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source