JavaScript shows Div across frames

Source: Internet
Author: User

The project encountered the need to cross-frame display div problem, Baidu a bit, collected a bit of wisdom of the masses, special sorting out the following example, first look at:

In this case there are 4 pages:

Index.html

Frame.html

<frameset rows= "74,*" cols= "*" style= "z-index:1" >        <frame src= "frame-top.html" style= "Z-index:1" >        <frame src= "frame-main.html" style= "z-index:1" > </frameset><noframes></noframes>

Frame-top.html

<a href= "#" onclick= "Top.document.getElementById (' Popid '). style.display= ' Block ' >show div</a>


Frame-main.html

I ' m main frame

The page is set up, directly open index.html can see the effect. The specific principle is to display the div of the parent page from inside the frame by setting the div on the parent page.

JavaScript shows Div across frames

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.