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();
}
查看全文
相关阅读:
mysql5.7.11修改root默认密码
linux tar文件解压
用Maven插件生成Mybatis代码/数据库
java对象与json对象间的相互转换
json串转对象
maven web 项目中启动报错java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
MyBatis多数据源配置(读写分离)
使用HTML5 Web存储的localStorage和sessionStorage方式
谷歌浏览器 DEV Tools
数据库建表原则
原文地址:https://www.cnblogs.com/s021368/p/1531488.html
最新文章
【转】Unity网格合并_材质合并
BleedTree动画混合树[Unity]
【转】Unity3D的LightProbe动态光探头用法介绍
灯光探测器LightProbe[Unity]
【转】Unity3D中脚本的执行顺序和编译顺序
【转】(八)unity4.6Ugui中文教程文档-------概要-UGUI Rich Text
【转】(七)unity4.6Ugui中文教程文档-------概要-UGUI Auto Layout
捋一捋js面向对象的继承问题
Linux 网络管理
spring 配置 Java配置类装配bean
热门文章
浏览器兼容css
消息队列之 RabbitMQ
Restful
eclipse常用插件介绍
eclipse断点Source not found解决方案1,2,3
正向代理与反向代理【总结】
js 数据类型转换
tomcat安全配置(二)
tomcat安全配置
将mysql的查询结果导出为csv
Copyright © 2011-2022 走看看