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();
}
查看全文
相关阅读:
Python安装appium 遇见的报错
appium
QQ邮箱/微信邮箱发送邮件
Python-变量
神秘的咒语
宿命的PSS
E. Congruence Equation
D. Substring
leetcode 761. Special Binary String
F
原文地址:https://www.cnblogs.com/s021368/p/1531488.html
最新文章
python学习笔记(35)字典循环与字典排序
Django学习笔记(18)ORM之外键操作
Django学习笔记(17)ORM反向查询之related_name
python学习笔记(34)线程池&进程池
SQL基础语句
Django报错解决方案收集
git学习笔记(1)如何将clone到本地代码上传到自己的git项目
elementui 学习笔记(1)数据转换
Django学习笔记(15)实现模糊查询和精确查询
Django学习笔记(14)form和modelform
热门文章
Python随机产生多个数字
TCP的“三次握手”和“四次挥手”【转】
功能测试基础
验签
Pycharm更改颜色、字体大小
Python---两个文件相互对应
定位用法
用法
appium原理
用到的命令
Copyright © 2011-2022 走看看