AJAX进度条显示页面加载的加载进度百分比

发布于 2024-07-18 07:13:15 字数 63 浏览 2 评论 0原文

如何使用进度条显示页面的加载百分比? ...(类似于它们在 Flash 中的显示方式)

谢谢

How do you use a progressbar to show the loading percentage for a page? ...(similar to how they show in flash)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

小矜持 2024-07-25 07:13:15

不可能(在没有插件或扩展的 IE8 和 FF3 和 Opera 上)。 如果您想要真实的加载百分比,请包括 HTML + Javascript + 样式表 + 图像。 您只能检测到页面加载了多少文件(此技术只能检测到图像和javascript)。

Impossible(on IE8 & FF3 & Opera without plugin or extension). If you want real loading percentage include HTML + Javascript + Stylesheet + Image. you can only detect how many file loaded to page(only Image & javascript can be detected by this technique).

墨洒年华 2024-07-25 07:13:15

我想说,如果您需要页面的进度条,则该页面可能需要重新考虑。

就我个人而言,我不喜欢有进度条的页面(例如华硕下载区的进度条)。 他们只是烦人。 我的浏览器已经有进度条了。 我希望我的带宽用于下载该页面,而不是仅告诉我我仍在等待该页面的图形。

不过,当涉及到页面上的 AJAX 请求时,我只会使用某种微调器。 告诉用户有事情发生并且页面没有死。 再说一遍,如果后台请求花费的时间太长以至于您需要进度条,我会再次说后台请求可能应该重新考虑。

I would say that if you need a progressbar for a page, that page might need some rethinking.

Personally I don't like pages that have progress bars (Like the one in the ASUS Download Area). They are just annoying. My browser already have a progressbar. And I would like my bandwidth to be used to download the page and not graphics that would just tell me that I am still waiting for the page.

When it comes to AJAX requests ON a page though, I would just use a spinner thing of some sort. To tell the user that something is going on and that the page is not dead. And again, if the background request takes so long that you would need a progressbar, I would again say that the background request should maybe be rethought.

难得心□动 2024-07-25 07:13:15

哦,这么简单,你复制我的代码并粘贴到你的网站上,虽然不是很酷,但仍然可以使用。

代码: <脚本语言='JavaScript' SRC='http://www.seabreezecomputers.com/tips/progress.js' TYPE='text/javascript'>

记住此代码粘贴在“/Head”和“BODY”之间

<前><代码> [1]:http://dw6-vista-tdx.blogspot.com

oh that so easy, you copy down my code and paste on your website, however is not very cool, but still can use.

CODE : <SCRIPT LANGUAGE='JavaScript' SRC='http://www.seabreezecomputers.com/tips/progress.js' TYPE='text/javascript'>
</SCRIPT>

REMEMBER THIS CODE IS PASTE BETWEEN "/Head" and "BODY"

  [1]: http://dw6-vista-tdx.blogspot.com
-柠檬树下少年和吉他 2024-07-25 07:13:15

嘿,请查看 s3fm 上的上传进度对话框,这是一个免费的在线 Amazon s3 文件管理器。

Hey, check out the upload progress dialog at s3fm, a free online Amazon s3 file manager.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文