积极答复者
判断网页加载进度

问题
答案
-
进度不好做,一般是显示正在加载,或是一个加动的 gif
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!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> <title>无标题页</title> <script type="text/javascript"> window.onload = function() { var a = document.getElementById("loading"); a.parentNode.removeChild(a); } document.write('<div id="loading" style="background:#CC4444;color:#FFF;width:80px;padding-left:5px;position:absolute;line-height:22px">正在读取...</div>'); </script> </head> <body style="margin:0px;padding:0px;font-size:12px;overflow-y:hidden"> <iframe src="http://social.microsoft.com/Forums/zh-CN/295/threads" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0"></iframe> </body> </html>
知识改变命运,奋斗成就人生!- 已标记为答案 NewJoin 2009年10月23日 3:52
-
显示进度到百分之几的一般都是假的,
在每执行一部都会传给客户端一个值,客户端通过定一个循环函数获得这个值进行显示。
Do My Best- 已建议为答案 NineTyNine_LiPei 2009年10月23日 2:03
- 取消建议作为答案 孟宪会Moderator 2009年10月23日 2:06
- 已标记为答案 NewJoin 2009年10月23日 3:52
全部回复
-
进度不好做,一般是显示正在加载,或是一个加动的 gif
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!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> <title>无标题页</title> <script type="text/javascript"> window.onload = function() { var a = document.getElementById("loading"); a.parentNode.removeChild(a); } document.write('<div id="loading" style="background:#CC4444;color:#FFF;width:80px;padding-left:5px;position:absolute;line-height:22px">正在读取...</div>'); </script> </head> <body style="margin:0px;padding:0px;font-size:12px;overflow-y:hidden"> <iframe src="http://social.microsoft.com/Forums/zh-CN/295/threads" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0"></iframe> </body> </html>
知识改变命运,奋斗成就人生!- 已标记为答案 NewJoin 2009年10月23日 3:52
-
显示进度到百分之几的一般都是假的,
在每执行一部都会传给客户端一个值,客户端通过定一个循环函数获得这个值进行显示。
Do My Best- 已建议为答案 NineTyNine_LiPei 2009年10月23日 2:03
- 取消建议作为答案 孟宪会Moderator 2009年10月23日 2:06
- 已标记为答案 NewJoin 2009年10月23日 3:52