![](/img/trans.png)
[英]How to remove style from iframe tag (not inside iframe but inside tag)
[英]How to get style attribute of iframe from inside of that iframe(javascript)
我正在尝试在 iframe 元素可见时执行一项操作,但 iframe 具有定义了“可见性:隐藏”的样式属性,这使 output 为真 iframe's 不能,因此应用可见性检查。 谢谢你。
您可以使用 javascript 更改样式属性可见性,然后执行操作。 您将像这样运行代码。
let frame = document.querySelector("iframe");
if (frame.style.visibility = "visible") {
// Here you can perform required action
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.