Skip to content Skip to sidebar Skip to footer

Placing Revealed Hidden Content Before Html Spoiler Button

Just a few days ago, thanks to Google, I landed here and learnt how to make a spoiler in HTML. So the following code works:

Solution 1:

Simply do this :

<buttontitle="Click to Show/Hide Content"type="button"onclick="if(document.getElementById('spoiler') .style.display=='none') {document.getElementById('spoiler') .style.display=''}else{document.getElementById('spoiler') .style.display='none'}">Show/Hide</button><divid="spoiler"style="display:none">
ADD YOUR HIDDEN CONTENT HERE
</div>

Post a Comment for "Placing Revealed Hidden Content Before Html Spoiler Button"