I have been working on a project recently - Budou Collection. In short, it is to collect the pictures you like to the Budou page. Many aspects of iframe are used in this process, which can be summarized as follows: 1. As a pop-up layer to cover the bottom If you have ever made a black mask covering the entire page, and the user happens to be using IE6, and there happens to be a select element on the page, then you will have a headache (I won’t go into the principles here). We will find that the pop-up DIV cannot cover the select, so it is our iframe's turn to appear. The logic is as follows: Put an iframe at the same level as the pop-up div Ensure that the z-index of the iframe is smaller than the z-index of the pop-up div Add window resize and scroll events to ensure that the iframe can cover the entire page Part of the code Copy code The code is as follows:var iframe = U.isie6() ? '<iframe style="position:absolute;left:0;top:0;z-index:2000000;filter:Alpha(opacity=0); width:100%;height:' + ds.height + '" frameborder="0"></iframe>' : ''; $container.append(iframe).appendTo($body); 2. Writing cookies across domains There are two domains, a.com and b.com. Under certain conditions, some of the functions of b will appear on page a. Sometimes when operating page a, you need to do some operations on the cookies of domain b.com to facilitate the user's next visit. We only need to add an iframe (dynamic or fixed) to page a, with the src attribute pointing to a proxy page of b, and perform cookie operations on this page. |
>>: The English reading of various special symbols on the keyboard (knowledge popularization)
1. Operating Environment vmware14pro Ubuntu 16.04...
Preface MySQL supports many types of tables (i.e....
1. Purpose Write a Flask application locally, pac...
Copy code The code is as follows: <!DOCTYPE ht...
Table of contents 1.1. Enable MySQL binlog 1.2. C...
Assuming business: View the salary information of...
Due to work reasons, it is often not possible to ...
1.MySQL UPDATE JOIN syntax In MySQL, you can use ...
Table of contents nonsense text The first router/...
A few days ago, I saw an example written by @Kyle...
one. First of all, you have to package it in idea...
Table of contents When developing, analyzing the ...
If you want to install multiple tomcats, you must...
Vue methods and properties 1. Methods Usage 1 met...
Syntax: ROW_NUMBER() OVER(PARTITION BY COLUMN ORD...