zoukankan
html css js c++ java
asp.net后台编写 loading效果
使用方法:
protected void Page_Load(object sender, EventArgs e)
{
initJavascript();
FillCheckBox();
UnloadJavascript();
}
"页面加载中效果"
#region
"页面加载中效果"
/**/
///
<summary>
///
页面加载中效果
///
</summary>
public
static
void
initJavascript()
{
HttpContext.Current.Response.Write(
"
<script language=JavaScript type=text/javascript>
"
);
HttpContext.Current.Response.Write(
"
var t_id = setInterval(animate,20);
"
);
HttpContext.Current.Response.Write(
"
var pos=0;var dir=2;var len=0;
"
);
HttpContext.Current.Response.Write(
"
function animate(){
"
);
HttpContext.Current.Response.Write(
"
var elem = document.getElementById('progress');
"
);
HttpContext.Current.Response.Write(
"
if(elem != null) {
"
);
HttpContext.Current.Response.Write(
"
if (pos==0) len += dir;
"
);
HttpContext.Current.Response.Write(
"
if (len>32 || pos>79) pos += dir;
"
);
HttpContext.Current.Response.Write(
"
if (pos>79) len -= dir;
"
);
HttpContext.Current.Response.Write(
"
if (pos>79 && len==0) pos=0;
"
);
HttpContext.Current.Response.Write(
"
elem.style.left = pos;
"
);
HttpContext.Current.Response.Write(
"
elem.style.width = len;
"
);
HttpContext.Current.Response.Write(
"
}}
"
);
HttpContext.Current.Response.Write(
"
function remove_loading() {
"
);
HttpContext.Current.Response.Write(
"
this.clearInterval(t_id);
"
);
HttpContext.Current.Response.Write(
"
var targelem = document.getElementById('loader_container');
"
);
HttpContext.Current.Response.Write(
"
targelem.style.display='none';
"
);
HttpContext.Current.Response.Write(
"
targelem.style.visibility='hidden';
"
);
HttpContext.Current.Response.Write(
"
}
"
);
HttpContext.Current.Response.Write(
"
</script>
"
);
HttpContext.Current.Response.Write(
"
<style>
"
);
HttpContext.Current.Response.Write(
"
#loader_container {text-align:center; position:absolute; top:40%; 100%; left: 0;}
"
);
HttpContext.Current.Response.Write(
"
#loader {font-family:Tahoma, Helvetica, sans; font-size:11.5px; color:#000000; background-color:#FFFFFF; padding:10px 0 16px 0; margin:0 auto; display:block; 130px; border:1px solid #5a667b; text-align:left; z-index:2;}
"
);
HttpContext.Current.Response.Write(
"
#progress {height:5px; font-size:1px; 1px; position:relative; top:1px; left:0px; background-color:#8894a8;}
"
);
HttpContext.Current.Response.Write(
"
#loader_bg {background-color:#e4e7eb; position:relative; top:8px; left:8px; height:7px; 113px; font-size:1px;}
"
);
HttpContext.Current.Response.Write(
"
</style>
"
);
HttpContext.Current.Response.Write(
"
<div id=loader_container>
"
);
HttpContext.Current.Response.Write(
"
<div id=loader>
"
);
HttpContext.Current.Response.Write(
"
<div align=center>页面正在加载中
</div>
"
);
HttpContext.Current.Response.Write(
"
<div id=loader_bg><div id=progress> </div></div>
"
);
HttpContext.Current.Response.Write(
"
</div></div>
"
);
HttpContext.Current.Response.Flush();
}
public
static
void
UnloadJavascript()
{
HttpContext.Current.Response.Write(
"
<script language=JavaScript type=text/javascript>
"
);
HttpContext.Current.Response.Write(
"
remove_loading();
"
);
HttpContext.Current.Response.Write(
"
</script>
"
);
}
#endregion
查看全文
相关阅读:
注意力机制在CV领域的应用之SEnet
知识蒸馏技术原理
batchsize如何影响模型的性能
docker网络 macvlan
docker pull使用 代理
auditd重启失败
3.Golang的包导入
2.golang应用目录结构和GOPATH概念
使用git版本管理时的免密问题
1.go语言目录结构
原文地址:https://www.cnblogs.com/ganmk/p/1207832.html
最新文章
【操作系统之十一】任务队列、CPU Load、指令乱序、内存屏障
【操作系统之十】内存分页管理与swap
【操作系统之九】Linux常用命令之netstat
【操作系统之八】Linux常用命令之top
【操作系统之七】Linux常用命令之tail
java类的初始化顺序
spring-boot-devtools在Idea中热部署方法
Spring boot 自定义一个starter pom
Spring中基于java的配置
SVN更新报错:Checksum mismatch for ……
热门文章
mysql高水位问题解决办法
设计模式--责任链模式
设计模式--命令模式
设计模式--桥接模式
cython学习?
PyInstaller将Python文件打包为exe后如何反编译(破解源码)以及防止反编译
python 判断两个集合相等
CAM 与grad-CAM对CNN的可解释性
cv注意力模型 (言有三)
注意力机制在CV领域的应用之CBAM
Copyright © 2011-2022 走看看