开发者

Is their any way to place content in IFRAME without using src

开发者 https://www.devze.com 2023-01-24 07:58 出处:网络
I have created a custom WYSIWYG editor for editing an XML file. I have used an <iframe> for this.

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>

Is their any javascript code for this.Thanks in advance.


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>.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号