【发布时间】:2016-09-07 08:27:35
【问题描述】:
实际上使用 jQuery(v1 和 v2 - 最新版本)面临一个非常奇怪的行为。 我有一个管理内容的脚本,但是当内容包含 iframe 时它会失败。
<article>
<section>some text with mixed tags and an <iframe /> </section>
</article>
<script>
$('section').each(function() {
console.log( $(this).html() )
});
</script>
这是返回未定义
我是否缺少在这些情况下使用的一些解决方法?
【问题讨论】:
-
你应该像这样打开和关闭你的 iframe:
标签: javascript jquery iframe