zoukankan
html css js c++ java
asp.net 加页面Loading效果
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(
!
IsPostBack)
{
Loading();
}
}
public
static
void
Loading()
{
HttpContext hc
=
HttpContext.Current;
hc.Response.Write(
"
<div id='loading'>
"
);
hc.Response.Write(
"
<img src='Images/Loading/loading.gif'/>
"
);
hc.Response.Write(
"
</div>
"
);
//
hc.Response.Write("<script>mydiv.innerText = '';</script>");
hc.Response.Write(
"
<script type=text/javascript>
"
);
hc.Response.Write(
"
function document.onreadystatechange()
"
);
hc.Response.Write(
@"
{ try
{
if (document.readyState == 'complete')
{
delNode('loading');
}
}
catch(e)
{
alert('页面加载失败');
}
}
function delNode(nodeId)
{
try
{
var div =document.getElementById(nodeId);
if(div !==null)
{
div.parentNode.removeChild(div);
div=null;
CollectGarbage();
}
}
catch(e)
{
alert('删除ID为'+nodeId+'的节点出现异常');
}
}
"
);
hc.Response.Write(
"
</script>
"
);
hc.Response.Flush();
}
查看全文
相关阅读:
bootstrap之CDN
bootstrap之HTML模板
Glyphicon 字体图标
crawler4j 学习(二)
【软件构造】第二章 软件构建的过程和工具(2)
【软件构造】第二章 软件构建的过程和工具(1)
【软件构造】第一章 软件构造基础(2)
【软件构造】第一章 软件构造基础(1)
机器学习技法笔记-Lecture 1 Linear support vector machine
机器学习基石笔记-Lecture 15 Validation
原文地址:https://www.cnblogs.com/s021368/p/1531488.html
最新文章
Android adb端口转发调试助手Packet Sender
安卓MonkeyRunner源码分析之工作原理架构图及系列集合
如何为你的初创应用App开发公司建立战略计划(商业战略竞争五力学)
Ronco创投原则
软考高级(七)
软考高级(六)
软考高级(五)
各种uml图
软件测试模型
软考高级(四)
热门文章
软考高级(二)
软考高级(三)
软考高级(一)用例图
svn插件
bootstrap之排版类
bootstrap之强调文本的类(带颜色)
bootstrap之div居中
bootstrap之伪元素
Font Squirrel
bootstrap之移动支持
Copyright © 2011-2022 走看看