[英]how to get css element at parent document from iframe
我在父文档中有<div id='footer'>
,并且没有CSS属性。 加载文档后,我想知道iframe中该元素的CSS属性。 我想知道顶部属性,左边的宽度高度将随之而来。
我用它,但不工作。
footer=$('#footer', window.parent.document);
footer=$(footer);
alert(footer.top);
它在警告对话框中显示“未定义”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.