怎样让文本框显示HTML?

来源:百度知道 编辑:UC知道 时间:2024/06/28 00:26:51
<textarea name="1" cols="50" rows="20" ONFOCUS="_CPopup_Hide();_fireFocus()"><%=rsnews("content") %></textarea>
代码如此,我想让CONTENT的内容显示成HTML的.有人知道不?

<textarea name="1" cols="50" rows="20" ONFOCUS="_CPopup_Hide();_fireFocus" id="text1"></textarea>
<script>
document.getElementById("text1").innerHTML="<%=rsnews("content") %>";
</script>

server.htmlencode(rsnews("content"))

需要费这么大劲吗?把textarea标签去掉不就完了吗?