Code4Blog

1. Create a button "View"/"Hide" to hide your content.

Here does content display
<div>
<div>
<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 = 'View'; }" style="font-size: 10px; margin: 0px; padding: 0px; width: 75px;" type="button" value="View" /></div>
<div>
<div style="display: none;">
Here is hiden content
 </div>
</div>
</div>
Here is hiden content

2.



0 Comments :

Post a Comment

Nên viết tiếng Việt có dấu để cho mọi người dễ đọc
Nếu có LINK tải tài liệu nào hỏng, bạn thông báo giúp tôi.
Chân thành cảm ơn.