+ 1
How can I display Articles after a button click inside <div>
6 Respostas
0
I wrote code for you , watch this:
https://code.sololearn.com/WQXqvYmlnmR4
+ 5
@kusol watchara-apanukorn thanks for accepting every single challenge I gave you. either you lose or draw you never declined my challenge. That's why I have reached platinum today. So a huge credit goes to you. Hope playing challenges with me helped you a little bit.
+ 3
@hamiza awesomr
+ 3
@ranjan finally
+ 2
@Ranjan Bagri Congratulation!!!!
0
First this is my HTML code:
<button onclick="showAndHidden()">Show/Hide</button>
<div id="justDIV">
Hello world!
</div>
Then add some javascript:
function showAndHidden() {
var parent = document.getElementById('justDIV');
if (parent.style.display === 'none') {
parent.style.display = 'block';
} else {
parent.style.display = 'none';
}
}
Hope this code will help you.