如何使用其标签打印HTML邮件?

时间:2014-08-24 13:40:33

标签: javascript html tags

我想打印带有HTML标签的邮件。为了更准确,这就是我希望用户准确看到的内容:

  

<script>alert("hello world");</script>

这意味着我也希望包含两个脚本标记。

2 个答案:

答案 0 :(得分:1)

&lt;script&gt;alert("hello world");&lt;/script&gt;

答案 1 :(得分:0)

你可以逃脱像:

这样的人物
&lt;script&gt;alert(&quot;hello world&quot;);&lt;/script&gt;

http://www.htmlescape.net/htmlescape_tool.html