我在HTML页面中有两个框架。如何显示加载框架时的加载图标
在框架加载期间,我想显示一个加载图标,当框架完成加载时,我想隐藏它。
我已经试过这样
<h5 class="element-title">Indices </h5>
<iframe width="100" height="200" src="http://www.umich.edu" onload="onLoadHandlerforindices();" >
</iframe>
<h5 class="element-title">My Data </h5>
<iframe src="http://www.w3schools.com" onload="onLoadHandlerformydata();" ></iframe>
</iframe>
<img id="loadImg" src="http://www.cuisson.co.uk/templates/cuisson/supersize/slideshow/img/progress.BAK-FOURTH.gif" alt="loading...">
$(document).ready(function() {
$("#loadImg").hide();
});
function onLoadHandlerforindices()
{
$("#loadImg").show();
}
function onLoadHandlerformydata()
{
$("#loadImg").show();
}
但是图标没有被显示
这是我的小提琴
http://jsfiddle.net/11Lnatr6/3/
'onload'在加载后触发。 –