Thứ Sáu, 31 tháng 7, 2015

Code Button Ẩn Nội Dung

<div>
<div>
<input type="button" value="Xem nội dung ẩn mới" style="width:75px; font-size:11px; margin:0px; padding:4px; border="1"" 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 = 'Ẩn'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Xem'; }">
</div>
<div>
<div style="display: none;  border:#4F4F4F 1px solid; padding: 4px; background:# ">


Nội dung bạn muốn nhập

</div>
</div>
</div>
Demo
Test.Test.Test.Là.Ta.Đi.Test.Admin.Nghèo.Rớt.Mùng.Tơi

Không có nhận xét nào:

Đăng nhận xét