网页里的内容全部下载完毕后就会触发 onload 事件<html>
<head>
  <title>一个显示正在加载的页面写法</title>
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  <meta content="F.R.Huang(meizz梅花雨)//www.meizz.com" name="author">
  <script language=javascript>
    document.write("<div id=loadingDiv><br>&nbsp; 页面正在加载,"+
                   "请等待<span id=loading></span></div>");
    var s1 = setInterval("loading.innerText+='.'", 300);
    var s2 = setInterval("loading.innerText = ''", 8000);    function window.onload()
    {
      clearInterval(s1);
      clearInterval(s2);
      loadingDiv.removeNode(true);
      bodyHidden.style.display = "";
    }
  </script>
</head><body>
  <div id="bodyHidden" style="display: none">
    <!-- 网页的具体代码 -->
  </div>
</body></html>