function contents_nb(name, height) {
1. document.getElementById('contents_iframe').height = height+'px';
2. var $currentIFrame = $('#contents_iframe');
3. $currentIFrame.contents().find(".wrap_contents").hide();
4. $currentIFrame.contents().find(".greetings").fadeIn(2500);
}
这是我的 jquery 语法。
1~3号,效果很好。
但第 4 行不起作用。
iframe 内 html 文档的结构是...
<body>
<div class="wrap_contents">
<div class="greetings">
</div>
<div class="operational_philosophy">
</div>
</div>
</body>
</html>
是什么原因?是什么原因导致这个问题?
父 html 文档的语法是..
<iframe id="contents_iframe"></iframe>
问题是什么??
为什么在类中找不到类?
您可以使用 jquerycontents() 函数来访问/查找元素,
$("#iframeID").contents().find("#contentID");
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)