
tubotocdo
Active Member
Demo: http://thaihoa.at.ua/testcode.htm
Các bạn copy code bên dưới dán vào demo để test nha
Các bạn copy code bên dưới dán vào demo để test nha

HTML:
<html><head></head><body><center><img src="http://d2.violet.vn/uploads/resources/212/thucode.gif" border="0"
width="270" height="70">
<div style="font: 12px
Verdana,Geneva,Lucida,'Lucida
Grande'; margin-bottom: 3px;">
<input value="BẬT CHƯƠNG
TRÌNH" style="width: 130px;
font-size: 12px; margin: 0px;
padding: 0px;" 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 =
'TẮT CHƯƠNG TRÌNH'; } else
{ this.parentNode.parentNode.
getElementsByTagName('div')[1]
.getElementsByTagName('div')
[0].style.display = 'none';
this.innerText = ''; this.value =
'BẬT CHƯƠNG TRÌNH'; }"
type="button"></div>
<div style="min-height: 20px;
background-color: rgb(51, 153, 255); margin: 0px; padding:
1px; border: 1px inset;">
<div style="display: none;">
<div align="center">
<div style="border: 2px solid rgb(108, 177, 247); width:
1000px;">
<div style="border-width:
17px; border-style: outset;
border-color: rgb(105, 105, 105)
rgb(245, 245, 245) rgb(220, 220, 220) rgb(79, 79, 79);">
<div style="border: 3px solid rgb(255, 255, 255);
background: none repeat scroll 0% 0% rgb(117, 183, 249);">
<p><font color="#0000cc"
size="2"><b>VIETSKY.INFO</b></font></p>
<table style="width: 950px; border: 1px solid rgb(149, 148, 146); background: none repeat scroll 0% 0% rgb(207, 207, 207)
;">
<tbody>
<tr>
<td valign="top">
<form name="form1"
method="post">
<textarea name="code"wrap="soft" onclick="focus(this.code)" style="border: 1px
solid rgb(185, 184, 182);
padding: 5px; width: 470px;
height: 400px;">
Các bạn dán Code vào đây nhé!
</textarea></form>
</td>
<td valign="top"><iframe src="about:blank"
name="preview" style="height:
400px; width: 470px; border:
1px solid rgb(185, 184, 182);
background: none repeat scroll
0% 0% rgb(255, 255, 255);" frameborder="0"></iframe></td>
</tr>
</tbody>
</table>
<center><button onclick="preview.document.write (document.getElementsByTagName('TEXTAREA')[0].value);
preview.document.close();
preview.focus()">
Xem hiển thị?</button><button onclick="window.document.form
1.code.value='';preview.document.write (document.getElementsByTagName('TEXTAREA')[0].value);
preview.document.close();
preview.focus()"> Xóa tất cả?</button><button
onclick="window.location.href=window.location.href"> Làm lại</button></center>
<p><font color="#cc0033"
size="1"><b><u> Nguồn</u></b></font>:
<font color="#ff00cc"
size="1"><b><i> http://vietsky.info</i></b></font></p>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<center><font color="#0000ff"
<b="">Chương trình dùng chính xác cho các loại mã Java Script; HTML.<br>
<b>Chúc các bạn thành công!</center></b>
</center></body></html>