他们是否可以在不使用src的情况下将内容放入IFRAME中 [英] Is their any way to place content in IFRAME without using src
问题描述
我已经创建了一个定制的WYSIWYG编辑器来编辑XML文件。我为此使用了< iframe>
。
我已经解析了XML文件和变量中的所有内容。如何将此内容放置在< iframe>
?
中我试过这段代码,但它不工作:
I have created a custom WYSIWYG editor for editing an XML file. I have used an <iframe>
for this.
I have parsed the XML file and all the contents in a variable. How can I place this content in the <iframe>
?
I tried this code but it is not working:
<iframe id="textbox" style="width:300px; height:150px" >
<?php echo $content ?>
</iframe>
是他们的任何javascript代码。预先感谢。
Is their any javascript code for this.Thanks in advance.
推荐答案
没有。根据 W3C ,< iframe>
仅在不支持框架的浏览器中显示。
尽管有一个简单的解决方案:其他元素将为您工作。考虑使用简单的< div>
。
No. According to the W3C, the content of an <iframe>
is only displayed by browsers that don't support frames.
There's a simple solution though: Every other element will work for you. Consider using a simple <div>
.
这篇关于他们是否可以在不使用src的情况下将内容放入IFRAME中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!