我在Chrome中通过Javascript向textArea添加文本(在火狐/IE中,这是一种完全不同的方式,因为Chrome不支持contentWindows)。
下面是我的代码:
document.getElementById("vB_Editor_001_textarea").value += '<font color="white"><b>' + numberLabel + ':</b> ' + armory + '</font><br/>';这个超文本标记语言无需解析就可以直接放入textArea中。当它命中textArea时,我如何让它解析成带有超文本标记的普通文本?
谢谢!
发布于 2010-12-26 11:37:02
myTextArea.innerHTML = '...';怎么样?
https://stackoverflow.com/questions/4532641
复制相似问题