Membuat Tombol Show/Hide Di Blog

Copy paste kode di bawah ini di blog - postingan kamu.

<div style="margin-bottom: 1px;">
<i><b><small></small></b></i><input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="font-size: 10px; margin: 0px; padding: 0px; width: 90px;" type="button" value="Show" /></div>
<div style="border: 0px inset; margin: 0px; padding: 5px;">
<div style="display: none;">
<table border="1"><tbody>
<tr bgcolor="#1da7e7">  <td>

tulisanmu disini...

</td> </tr>
</tbody></table>
</div>
</div>

Hasilnya di bawah ini...


<div style="margin-bottom: 1px;">
<i><b><small></small></b></i><input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="font-size: 10px; margin: 0px; padding: 0px; width: 90px;" type="button" value="Show" /></div>
<div style="border: 0px inset; margin: 0px; padding: 5px;">
<div style="display: none;">
<table border="1"><tbody>
<tr bgcolor="#1da7e7">  <td>

tulisanmu disini...

</td> </tr>
</tbody></table>
</div>
</div>


dan kode ini...
<div id="spoiler">
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">
<input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="font-size: 11px; margin: 0px; padding: 0px; width: 55px;" type="button" value="Show" /></div>
<div class="alt2" style="-moz-background-clip: border; -moz-background-inline-policy: continuous; -moz-background-origin: padding; background: rgb(225, 228, 242) none repeat scroll 0% 0%; border: 1px inset; margin: 0px; padding: 0px;">
<div style="display: none;">
Tulisanmu disini...
</div>
</div>
</div>

Hasilnya
Cilup ba....................
Posting Komentar (0)
Lebih baru Lebih lama