JavaScript 进度条 [英] JavaScript progress bar

查看:62
本文介绍了JavaScript 进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个进度条,当我点击一个按钮时应该显示它,例如立即验证".我的要求是检查 2000 个 URL 是否有效.这在程序中执行时花费了大量时间.所以我需要向用户显示一个进度条以了解状态.如何使用 JavaScript 执行此操作?

I want to have a progress bar which should show when I click on a button, e.g. "validate now". My requirement is to check 2000 URLs whether they are working or not. This was taking a lot of time while executing in program. So I need to show a progress bar to the user to know the status. How can I do this using JavaScript?

推荐答案

你可以使用 jQuery UI 进度条 简单、美观且易于实现,您只需要每隔一两秒更新一次值.

you could use the jQuery UI Progress bar simple, good looking and easy to implement, you just need to update the value every second or two.

$("#progressbar").progressbar({
        value: 37
    });

这篇关于JavaScript 进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆