[英]How to remove or hide a div, which is inside an IFRAME that pulls an external link?
[英]how to remove or hide a div from a iframe added
<iframe title="Dubai Free SEO Quote"
src="" allowtransparency="true"
allow="geolocation; microphone; camera"
allowfullscreen="true"
name="41015223436139"
id="41015223436139"
scrolling="no"
style="width: 10px; min-width: 100%; display: block; overflow: hidden; border: medium none; height: 225px;" >
</iframe>
<script>
$(document).ready(function() {
$("#41015223436139").contents().find(".black-friday-2019").remove();
});
</script>
任何帮助表示赞赏
网站和 iframe 是否在同一个域下? 如果是这样,请在 iframe 页面中尝试以下脚本
if (window.self !== window.top) {
document.querySelectorAll(".black-friday-2019").forEach(el => el.remove());
} else {
document.querySelectorAll(".black-friday-2019").forEach(el => el.add());
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.