<div style="padding: 10px; border:1px solid #ccc;background:#f9f9f9"><div style="margin-bottom: 0px;font-family: arial;font-size:12px;"><b>Spoiler Title:</b><input value="Show" style="border:0px solid #000;margin:0px;color:#0000FF;font-family: arial; font-size: 12px; height:16; background:#f9f9f9" 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'; }" type="button"> </div><div style="margin: 0 10px 0px 10px; padding: 0px; border: 0px inset #fff;"><div style='display:none'><br/>Text Spoiler</div></div></div>Demo spoiler code ala Wikipedia:
Enhanced Pair-Bi:
Catatan Penting: kode-kode HTML/XML yang akan dijalankan (bukan tulisan [ seperti kode spoiler di atas]) harus dibuat satu baris, mengapa demikian?