jquery-ui 进度条
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | <!DOCTYPE html> <html> <head> <meta charset= "utf8" /> <title>progressbar</title> <style type= "text/css" > #divprogressbar{ width:300px; height:30px; } .progress-label{ float:left; margin-left:40%; margin-top:3px; } </style> <link rel= "stylesheet" href= "css/jquery-ui-1.10.4.min.css" media= "screen" /> <script type= "text/javascript" src= "js/jquery-1.10.2.js" ></script> <script type= "text/javascript" src= "js/jquery-ui-1.10.4.min.js" ></script> </head> <body> <div id= "divprogressbar" ><div class = "progress-label" >loading...</div></div> <script type= "text/javascript" > $( function (){ // var val=0; $( '#divprogressbar' ).progressbar({value:0}); $( '#divprogressbar' ).progressbar({ value:0, change: function (){ $( ".progress-label" ).text($( "#divprogressbar" ).progressbar( "value" )+ "%" ); }, complete: function (){ $( ".progress-label" ).text( "Complete!" ); } }); function progress(){ var val= $( '#divprogressbar' ).progressbar( "value" ) || 0; $( '#divprogressbar' ).progressbar( "option" , "value" ,val+1); if (val<99) { setTimeout(progress,100); } } setTimeout(progress,1000); } ); </script> </body> </html> |
查看文档:http://jqueryui.com/progressbar/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· [AI/GPT/综述] AI Agent的设计模式综述
2013-05-28 linux学习体会,献给初学者
2013-05-28 用php爬取网页