Button Show - Hide Spoiler

06:27:00

Assalamualaikum to all readers :)
entry hari ni Mila nak cakap pasal button show . tak tahu button show tu apa ?
tengok gambar bawah ni :
Sebelum klik:

Selepas klik:

1. Log in > Dashboard > Design > Add a Gadget > Html/Java Script
2. korang pilih lah kod mana-ii and then copy kod dibawahnya dan pastekan di bahagian Html/Java Script tau .

Button Show - Hide Spoiler *Bergambar
<center><div id="spoiler"><div><img src="URL GAMBAR KORANG" width="100" height="100" border="0" type="button" onclick="if (this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display != &#39;&#39;) { this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display = &#39;&#39;; this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;hide&#39;].style.display = &#39;none&#39;; this.innerText = &#39;&#39;; this.value = &#39;Hide Spoiler!&#39;; } else { this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display = &#39;none&#39;; this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;hide&#39;].style.display = &#39;&#39;; this.innerText = &#39;&#39;; this.value = &#39;Show Spoiler!&#39;; }" />
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-width:0px; padding:3px; width:90%">
<center><center>AYAT YANG KORANG NAK TULIS</center></center></div></div></div></center>

 Button Show - Hide Spoiler *Just Click / Bertulis
<div id="spoiler"><div><input value="TAJUK YANG KORANG NAK TULIS" style="width:70px ;font-size:10px;background-image: url(URL BACKGROUND KORANG);border-style: 2px solid #ff9fcc;" type="button" onclick="if (this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display != &#39;&#39;) { this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display = &#39;&#39;; this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;hide&#39;].style.display = &#39;none&#39;; this.innerText = &#39;&#39;; this.value = &#39;Hide Spoiler!&#39;; } else { this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;show&#39;].style.display = &#39;none&#39;; this.parentNode.parentNode.getElementsByTagName(&#39;div&#39;)[&#39;hide&#39;].style.display = &#39;&#39;; this.innerText = &#39;&#39;; this.value = &#39;Show Spoiler!&#39;; }" />
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-width:0px; padding:3px; width:90%">
<center><center>AYAT YANG KORANG NAK TULIS</center></center></div></div></div>
3. Dah ubah semua ? sekarang savekan. tengok jadi ke x .

Jangan lupa komen :)

You Might Also Like

0 comments

Terima kasih sebab sudi membaca entry ni :D Jangan lupa comment pulak . btw no harsh words okay ?

Popular Posts

Assalamualaikum