他们有什么方法可以在不使用 src 的情况下将内容放入 IFRAME 中吗?
我创建了一个自定义 WYSIWYG 编辑器来编辑 XML 文件。我为此使用了 。
我已经解析了 XML 文件和变量中的所有内容。如何将此内容放入 中?
我尝试了这段代码,但它不起作用:
<iframe id="textbox" style="width:300px; height:150px" >
<?php echo $content ?>
</iframe>
他们有任何 javascript 代码吗?提前致谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的
隐私政策
了解更多相关信息。 单击
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文
发布评论
评论(1)
不可以。根据 W3C,
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>
.绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!