如何将HTML上的转义字符直接转成HTML格式的元素
我如何将下列已经转义好的文本变成HTML格式,比如<编程<形式,并以HTML可视元素形式在页面上显示
代码:
<script language= "javascript ">
function Post01()
{
document.getElementById( "TextBox1 ").value= "<table width= "100% " cellpadding= "0 " cellspacing= "10 " ><tr><td height= "25 " colspan= "2 " class= "title1 "><span>优衣日志</span></td></tr><tr><td width= "100 " height= "100 " align= "center " valign= "middle " class= "b100 "><a href= "1 "><img alt= "张杰的日志1 " src=1 " /></a></td><td width= "630 " class= "td1 "><span class= "myright ">[ 2007-4-15 0:00:00] </span><a href= "6 ">张杰1</a> 的 <a href= "1 ">张杰的日志1</a><br /><span class= "highlight ">所属分类:</span><a href= "# ">购物经历</a> <span class= "highlight ">标签:</span><br /><span class= "highlight ">日志内容:</span>张杰的日志内容1<a href= "1 ">[查看]</a></td></tr><tr><td width= "100 " height= "100 " align= "center " valign= "middle " class= "b100 "><a href= "6 "><img alt= "张杰的日志1 " src=6 " /></a></td><td width= "630 " class= "td1 "><span class= "myright ">[ 2007-4-15 0:00:00] </span><a href= "6 ">张杰1</a> 的 <a href= "6 ">张杰的日志1</a><br /><span class= "highlight ">所属分类:</span><a href= "# ">购物经历</a> <span class= "highlight ">标签:</span><br /><span class= "highlight ">日志内容:</span>张杰的日志内容1<a href= "6 ">[查看]</a></td></tr><tr><td width= "100 " height= "100 " align= "center " valign= "middle " class= "b100 "><a href= "14 "><img alt= "张杰的日志1 " src=14 " /></a></td><td width= "630 " class= "td1 "><span class= "myright ">[ 2007-4-15 0:00:00] </span><a href= "6 ">张杰1</a> 的 <a href= "14 ">张杰的日志1</a><br /><span class= "highlight ">所属分类:</span><a href= "# ">购物经历</a> <span class= "highlight "&a