The iframe embedded page elements are displayed on the parent page and displayed in full screen. iframe embedded

Source: Internet
Author: User

The iframe embedded page elements are displayed on the parent page and displayed in full screen. iframe embedded

(I have been registering a blog for a long time, and I have never been willing to add anything to it. I think it is better to search for something and find it whenever I want to write something, but it is always necessary to start, so this is my first blog, and it will never be the last one. If you don't talk nonsense, just get started)

 

Iframe and pop-up words are familiar to js experts. As a newcomer, I have encountered such a strange demand at work during the learning stage, A full screen function should be implemented on the introduced iframe page.

A rough look, this is not easy, simulate the F11 function keys or something, so a search on the Internet really has a lot of cases about full screen, so I borrowed it.

Labels ):

1 <! DOCTYPE html> 2 

Well, I think this effect is really not great, but also browser compatibility (FireFox = javasrequestfullscreen; W3C = requestFullscreen; Chrome, etc. = webkitRequestFullScreen; ie11 = msRequestFullscreen ).....

So I immediately put it in the project. What is the result? Execute the following code (parentpage.html ....

1 <! DOCTYPE html> 2 

Oh, it seems that it does not take effect. Why?

Obviously it does not work. What should I do? Since the introduced sub-page iframe does not take effect, is it possible from the parent page?

Then try to find the parent class and execute the full screen function, and change the page (fullscreenpage.html). The Code is as follows:

1 <! DOCTYPE html> 2 

 

Haha. After the change, I found that it was okay and the problem was solved.

For jQuery, please download and import the reference on your own. I will not elaborate on it here.

Here is a jQuery download address: jquery downloads all versions (Real-time update)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.