I am not able to remove on div from iframe from my website http://dubaimarketingexperts.com/index.html div to be removed
<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>
Any help is appreciated
Are both the website and iframe under the same domain? If so, try the following script in your iframe's page
if (window.self !== window.top) {
document.querySelectorAll(".black-friday-2019").forEach(el => el.remove());
} else {
document.querySelectorAll(".black-friday-2019").forEach(el => el.add());
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.