0
display a content of div element using js
<button onclick = "test1();">Test</button> <div id = " test1" style = "display:none;">Hai there...</div> <script> function test1(){ document.getElementById(" test1"). style.display; } </script> doesnt work... (meanwhile you are reading this i'm still searching the solution on google... but still please help me ;) )
1 Odpowiedź
+ 6
id=" test1" is wrong, should be id="test".
....style.display = "block"; // you forgot to assign display property.