首页 > 解决方案 > 我们如何找到任何 iframe 中的页面的样式表?

问题描述

我们如何找到任何 iframe 中的页面的样式表。

<iframe id="#iframe" src="view_page.php" 
style="transition: none 0s ease 0s;" width="750" height="899"></iframe>

console.log(document.styleSheets); 

如果页面在没有 iframe 的浏览器中加载,则上述内容将起作用。document.styleSheets 将给出一个样式表数组,包含在文件中。但是,当页面在 iframe 内时,它不起作用。

标签: javascriptjquery

解决方案


推荐阅读