先建立一个iframe,如下:
<iframe id="newsFrame" width=600 height=500 frameborder=1 scrolling=no></iframe>
然后在javascript中写以下代码可以实现我要的效果,即按照样式显示:
window.newsFrame.document.writeln("<H1>天空</H1><P>   你好! <FONT face=隶书 size=3>大撒法</FONT></P>");
但把代码改成以下就没有显示了:
window.newsFrame.document.writeln('<%=content%>');
因为content是从另一客户端传来的包含样式的字符串,所以我只能在程序中引用content,可却无法显示.哪位大虾帮忙看看.