How to implement html nested iframe to wait for the iframe page to load before calling the next step_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:56:06
Original
1791 people have browsed it

如果想在你的html里面显示一张图片,或者显示一个报表,经常会在里面嵌套iframe,当我们点查询报表时,在报表显示过程中,我们想做个遮罩层,提示等待...但是报表显示出来后,我们如何把遮罩层去掉,让报表更好的展示呢?

我就用代码来解释一个例子吧:

<div align="left" style="height: 100%" id ="benefitnotice_report">	<iframe id="benefitnotice_iframe" width="100%" height="90%" frameborder="0" >	</iframe></div>
Copy after login

This is an iframe nested inside the html div

The js that sends the url to display the report is as follows:

	var id ="#benefitnotice_report";		showWaiting('正在加载报表' , null, id);//遮罩层调用		src=src+"&aic1621="+aic1621+"&aic1622="+aic1622+"&aae140="+aae140+"&aaf101="+aaf101+"&aaz070="+aaz070+"&aac031="+aac031;						$("#benefitnotice_iframe").attr("src",src);
Copy after login
After the report is displayed, remove the mask layer:

	$("#benefitnotice_iframe").load(function(){           closeWaiting("#benefitnotice_report");    }); 
Copy after login



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!