Contoh kode untuk membuat tombol spoiler
<div><input type="button" value="Show Spoiler ›" style="width:120px;font-size:10px;margin:10px 0 0 0;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('span')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('span')[0].style.display = ''; this.innerText = ''; this.value = 'Hide Spoiler ‹'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('span')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Spoiler ›'; }"></div><div class="codebox"><span style="display: none;">Tulisan Atau Gambar Kamu Disini !</div>
0 komentar:
Posting Komentar