Rich Text in JavaScript

在JavaScript中丰富的文本

问题 (Question)

I would like to display rich text to my users but I do not need to have them edit it. Is there JavaScript for a simple display of rich text?

我想显示丰富的文字我的用户,但我不需要编辑。有一个简单的文本显示JavaScript?

最佳答案 (Best Answer)

You should use HTML: <p> your text here </p>

But if you really want JavaScript: document.write(" your text here ") That is assuming that you want a blank page with text.

你应该使用HTML:<p> your text here </p>

但如果你真的想让JavaScript:document.write(" your text here ")这是假设你想要一个空白页的文本。

本文翻译自StackoverFlow,英语好的童鞋可直接参考原文:http://stackoverflow.com/questions/23450485