


How to operate the parent page of an iframe child page to block the page pop-up layer effect
This time I will show you how to operate the parent page of an iframe to block the page pop-up layer effect. How to operate the parent page of an iframe to block the page pop-up layer effect. What are the precautions? , here is the actual combat Let’s take a look at the case.
Question: In index.html, iframe introduces son.html. How to click an operation in son.html to block the entire page and pop up the layer to be displayed?
Preparation: index.html son.html
Ideas:
One: iframe in index.html introduces son.html,
<!-- 右侧iframe开始 --> <div id="resDiv" class="resDiv"> <iframe name="res" class="iframestyle" allowtransparency="true" src="son.html" frameborder="0" scrolling="no"></iframe> </div> <!-- 右侧iframe结束 -->
2: In the body part of index.html Add shielding layer and content display layer
<!--弹出的登录页面层--> <div id="mapLayer" style="display: none; " > <input type="button" value="关闭" onclick="closeMap()" /> </div> <!--屏蔽层,用来透明的屏蔽整个页面--> <div id="mapBgLayer" style="position:absolute; display: none;"></div>
Three: Set the style of div in index.html and implement the method of opening and closing the layer
<style type="text/css"> #BgLayer { background: #939393 none repeat scroll 0 0; height:100%; width:100%; left:0; top:0; filter: alpha(opacity=80); /* IE */ -moz-opacity: 0.8; /* Moz + FF */ z-index: 10000; } #Layer { width: 400px; height: 400px; margin: -180px 0 0 -170px; left: 50%; top: 50%; position: absolute; background: #FFF; z-index: 10001; border: 1px solid #1B5BAC; } </style> <script type="text/javascript"> /*显示页面*/ function showDiv) { var bg = document.getElementById("BgLayer"); var con = document.getElementById("Layer"); //var w = document.documentElement.clientWidth; //网页可见区域宽 //var h = document.documentElement.clientHeight;//网页可见区域高 var w = document.body.scrollWidth; //网页正文全文宽 var h = document.body.scrollHeight; //网页正文全文高 // alert(w+"-"+h); bg.style.display = ""; bg.style.width = w + "px"; bg.style.height = h + "px"; con.style.display = ""; } /*关闭*/ function closeDiv() { var bg = document.getElementById("BgLayer"); var con = document.getElementById("Layer"); bg.style.display = "none"; con.style.display = "none"; } </script>
Four: Call the parent page for an operation in son.html Method
<a href="javascript:void(0)" onclick="parent.window.showDiv()">查看</a>
I believe you have mastered the method after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
The hr horizontal line in HTML How to use
htmlHow to achieve mixed graphics and text
How to use iframe to embed other web pages in the current web page
The above is the detailed content of How to operate the parent page of an iframe child page to block the page pop-up layer effect. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PyCharm is a very popular Python integrated development environment (IDE). It provides a wealth of functions and tools to make Python development more efficient and convenient. This article will introduce you to the basic operation methods of PyCharm and provide specific code examples to help readers quickly get started and become proficient in operating the tool. 1. Download and install PyCharm First, we need to go to the PyCharm official website (https://www.jetbrains.com/pyc

We need to use WeChat APP all the time every day. The functions here are rich and diverse, not only for everyone to chat here, but also for you to handle various things in life. They can solve some problems very well, and their lives can become better and better. Nowadays, everyone still likes to check the circle of friends. You will find that there are some life updates posted by your friends on the circle of friends. information, record some of your wonderful life, and set the visibility range of your Moments. You can view these Moments within a specified time. It is your own decision. Every time you check your Moments, you will be able to discover something. Everyone is very irritated by the advertising push interface and wants to close it.

sudo (superuser execution) is a key command in Linux and Unix systems that allows ordinary users to run specific commands with root privileges. The function of sudo is mainly reflected in the following aspects: Providing permission control: sudo achieves strict control over system resources and sensitive operations by authorizing users to temporarily obtain superuser permissions. Ordinary users can only obtain temporary privileges through sudo when needed, and do not need to log in as superuser all the time. Improved security: By using sudo, you can avoid using the root account during routine operations. Using the root account for all operations may lead to unexpected system damage, as any mistaken or careless operation will have full permissions. and

With the popularity of smart phones, we receive a large number of text messages every day, some of which are advertising and promotional messages, and some of which are spam text messages. These text messages not only waste our time, but also occupy the space of our mobile phones. Fortunately, however, iPhones offer some features to block these annoying text messages. This article will introduce how to block text messages using iPhone. To block text messages, first open the Settings app, then scroll and tap Messages. In the information settings interface, you can see some options, including "Blocked

We all particularly like the Tantan social platform. It is very safe and reliable. We can all make a lot of friends on the Internet here. If we match randomly, we will definitely be able to match users who like each other. When everyone is successfully matched, they can safely chat socially here. Chatting every day can bring everyone closer and become closer, and many friends are using this social network. When you are on the platform, you definitely don’t want some of your friends or some friends in your mobile address book to find out. To avoid some embarrassing situations, you can use the method of blocking contacts here, and there are not many If you know how to block contacts, you can read these tutorials brought to you by the editor.

LinuxDeploy operating steps and precautions LinuxDeploy is a powerful tool that can help users quickly deploy various Linux distributions on Android devices, allowing users to experience a complete Linux system on their mobile devices. This article will introduce the operating steps and precautions of LinuxDeploy in detail, and provide specific code examples to help readers better use this tool. Operation steps: Install LinuxDeploy: First, install

Presumably many users have several unused computers at home, and they have completely forgotten the power-on password because they have not been used for a long time, so they would like to know what to do if they forget the password? Then let’s take a look together. What to do if you forget to press F2 for win10 boot password? 1. Press the power button of the computer, and then press F2 when turning on the computer (different computer brands have different buttons to enter the BIOS). 2. In the bios interface, find the security option (the location may be different for different brands of computers). Usually in the settings menu at the top. 3. Then find the SupervisorPassword option and click it. 4. At this time, the user can see his password, and at the same time find the Enabled next to it and switch it to Dis.

As one of the most popular short video platforms in the world, Douyin provides a stage for users to show themselves and share their lives. During use, users may encounter situations where they are blocked by the other party. So, what is the status after Douyin is blocked by the other party? Can I still search for him? This article will answer these questions for you. 1. What is the status after Douyin is blocked by the other party? When your Douyin account is blocked by the other party, you will not be able to view the other party's works, comments, likes, etc. on the Douyin platform. The other party also cannot view your works, comments, likes, etc. When both parties block each other, each other will completely disappear on the Douyin platform. 2. Can I still search for him after his TikTok is blocked? When your Douyin account is blocked by the other party, you enter the other party’s nickname in the Douyin search bar.
