废话不多说,直接上代码好吧
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>框架中的LOADING</title>
</head>
<body>
<div align="center" style="position: absolute;
width: 96px; height: 96px; z-index: 1; left:160px; top:18px" id="load">
<img
src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599811896795&di=2c06b5a5462235e0a5ce93e2842b527a&imgtype=0&src=http%3A%2F%2Fhbimg.huabanimg.com%2Faf8ba90e5a40164dfa52125c5889d1ad2ce62cafbe70-9f0cWj_fw658" /> loading...
</div>
<iframe style="visibility:hidden" onreadystatechange=stateChangeIE(this) onload=Firefox(this) name="callfram"
id="callframe" width="1002" height="768" frameborder="0" marginheight="0">
</iframe>
<script>
function stateChangeIE(_frame) //IE下
{
if (_frame.readyState == "interactive") //state: loading, interactive, complete
{
var loader = document.getElementById("load");
loader.innerHTML = "";
loader.style.display = "none";
_frame.style.visibility = "visible";
}
}
function Firefox(_frame) //FF下
{
var loader = document.getElementById("load");
loader.innerHTML = "";
loader.style.display = "none";
_frame.style.visibility = "visible";
}
callfram.location.href = "https://blog.csdn.net/weixin_44600810/article/details/107518763";
</script>
</body>
</html>