您的位置:首页 > Web前端 > HTML

HTML编辑器内容代码太长无法显示的问题

2009-10-29 11:21 405 查看
这是一个常用的HMTL编辑器的错误调用形式:

<iframe id="myiframe" src="Editor/editor.htm?id=content&ReadCookie=0" frameborder="0" scrolling="no" width="650" height="460"></iframe>

<input type="hidden" name="content" value="<%=Server.HTMLEncode(rs("content"))%>">

有些源代码调用HTML编辑器喜欢把iframe放在input之前,当网速慢或通过域名访问时就会经常出现HTML编辑器所见即所得模式显示不出内容,JS提示错误。其实是常识性的错误,应该先让input将大量的代码读完后,再用iframe调用。

正确形式:

<input type="hidden" name="content" value="<%=Server.HTMLEncode(rs("content"))%>">
<iframe id="myiframe" src="Editor/editor.htm?id=content&ReadCookie=0" frameborder="0" scrolling="no" width="650" height="460"></iframe>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: