这是一个常用的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>