+ 2
How To Change CSS By Click Of An Element
I have one div and a button. I want for when I click on the button for the display type of the div to change from none to inline-block.
5 odpowiedzi
+ 5
<div id="thediv">previously hidden content</div>
<input type="button" value="click me!" onclick="document.getElementById('thediv').style.display='inline-block;';">
+ 7
Change the value of document.getElementById("mydiv").style.display
+ 3
Seriously? @Krishna answer is better?
Nothing againt him/you, but next time I will spare time of explict answer with full code ;P
(What made e react is that you've marked mine as best and modified it immediatly...)
+ 1
I'm really sorry. Ive never asked a question before. I didn't realize you could mark only one.
0
Thank you guys so much for the answers.