Show Loading
来源:互联网 发布:内地大尺度网络大电影 编辑:程序博客网 时间:2024/04/29 14:22
// JScript 檔function createDiv(){ if(document.body!=null) { var div_show_d=document.getElementById('div_show_d'); if(div_show_d==null||div_show_d==undefined) { div_show_d=document.createElement("<div id='div_show_d' style='margin:0px;background:Transparent;z-index:999;top:0;FONT-SIZE: 13px; FONT-FAMILY: arial;filter : Alpha(Opacity=60 , style=0);vertical-align:middle;display:none;'></div>"); document.body.appendChild(div_show_d); //創建Marquee CreateMarquee(div_show_d); div_show_d.style.display="none"; } }}function createFrame(){ if(document.body!=null) { var frame_test=document.getElementById('frame_test'); if(frame_test==null||frame_test==undefined) { frame_test=document.createElement("<iframe id='frame_test' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; display:none;background-color:#000000;filter : Alpha(Opacity=60 , style=0);'></iframe>"); document.body.appendChild(frame_test); //創建Marquee frame_test.style.display="none"; } }}function showDiv(){ var div=document.getElementById('div_show_d'); if(div!=null||div!=undefined) { div.style.height="100%"; div.style.width="100%"; div.style.position = "absolute"; div.style.top = "0px"; div.style.left = "0px"; div.style.zIndex = 999 ; div.style.display="block"; CreateMarquee(div); }}function showFrame(){ var frame=document.getElementById('frame_test'); if(frame!=null||frame!=undefined) { frame.style.height="100%"; frame.style.width="100%"; frame.style.position = "absolute"; frame.style.top = "0px"; frame.style.left = "0px"; frame.style.zIndex = 998 ; frame.style.display="block"; }}function HideDiv(){ var div=document.getElementById('div_show_d'); if(div!=null||div!=undefined) { document.body.removeChild(div); } }function HideFrame(){ var frame=document.getElementById('frame_test'); if(frame!=null||frame!=undefined) { document.body.removeChild(frame); } }function displayWaiting(){ if(document.readyState=="loading") { createDiv(); createFrame(); showDiv(); showFrame(); }} function CreateMarquee(obj){var mySpan=document.createElement("marquee");mySpan.innerText="Loading......" ;//顯示于頁面的提示文字mySpan.style.position="absolute";mySpan.style.top="50%";mySpan.style.width='100%';mySpan.style.left="0px";//mySpan.style.backgroundColor="#C3DAF5";//文字的背景顏色mySpan.style.color="blue";//文件的字體顏色mySpan.scrollDelay="100"; obj.appendChild(mySpan); } function checkId( varId){ var arrId=new Array(); arrId[0]="btn_VL"; arrId[1]="btn_VL"; var result=false; for(var i=0;i<arrId.length;i++) { if(arrId[i].toString()==varId) { result=true; break; } } return result;}window.onload=function(){ document.body.style.width="98%"; document.body.style.height="95%"; HideDiv(); HideFrame();}document.body.onclick=function(){ var obj=window.event.srcElement; if(obj!=undefined) { if(false == checkId(obj.id)) { if(document.readyState!="loading") { setTimeout("displayWaiting()",300); } }else{ if(document.readyState!="loading") { setTimeout("displayWaiting()",300); } setTimeout(function(){ HideDiv(); HideFrame(); },15000); } }}document.onreadystatechange=function(){ if(document.body!=null) { _state=document.readyState; if(_state=="complete") { HideDiv(); HideFrame(); } }}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Demo.aspx.cs" Inherits="Demo" %><!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>頁面回傳顯示Loading</title> <script type="text/javascript" src="js_showLoading.js" defer="defer"></script></head><body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="Have a try" OnClick="Button1_Click" /> </div> </form></body></html>
using System;public partial class Demo : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(5000); }}
- Show Loading
- show dynamic loading process
- 在pageinit和pagecreate事件中$.mobile.loading('show')不起作用
- show
- show
- 使用Image类show图,解决loading过重, 屏幕闪烁问题
- Loading.....
- loading...
- Loading
- loading
- loading
- loading
- Loading...
- Loading
- loading
- loading
- loading
- Loading...
- 黑马程序员_学习笔记22_HttpHanlder实现文件下载
- Linux显示文件内容命令
- mod是什么那 余数啦
- sql update
- 浅谈android 之 context
- Show Loading
- 二叉查找树 转换成 排序的双向链表
- 倒计时器
- 解决DataGridView绑定了数据源无法更新保存当前行的问题
- greenplum dblink
- metadata file does not match checksum
- 非常好的git教程
- Loadrunner的loadgenerator在linux上的配置和部署 – 使用非RSH连接
- SQL Server 存储过程 sp_helptext的不足以及解决方案