很好的正在加載提示的代碼(源於網絡)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BrowseAttachedFile.aspx.cs" Inherits="BrowseAttachedFile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>預覽</title>
    <script language=javascript>
<!--
        document.write('<div id=loadDiv style="padding-top:50; padding-left:50;color:red">' + '正在加載,請稍候<span id="loading"></span></div>');
        var setInterval1 = setInterval("loading.innerText +='.'", 300);
        var setInterval2 = setInterval("loading.innerText =''", 15000);
        function window.onload() {
            hiddenDiv.style.display = ""; //顯示頁面內容
            loadDiv.removeNode(true);
            clearInterval(setInterval1);
            clearInterval(setInterval2);
        }
// -->
</script>
 
</head>
<body style="margin-top:20px; ">
    <form id="form1" runat="server" style="width: 1200px; left: 20px; position: absolute;">
    <div id=hiddenDiv style="display:none">  <!--此div中間加入自己的內容-->
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
    </div>
 
    </form>
</body>
</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章