本文在于巩固基础
JqueryUI控件之滚动条
这次主要是看Jquery官网上的API文档来做的
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="Css/myCss.css"/> <link rel="stylesheet" type="text/css" href="Css/jquery-ui.min.css"> </head> <body> <div id="sss"> </div> <script src="Script/jquery-2.1.1.min.js"></script> <script src="Script/jquery-ui.min.js"></script> <script type="text/javascript" src="Script/myScript.js"></script> </body> </html>
/** * Created by Administrator on 2015/3/5 0005. */ var current=0; $(document).ready(function(){ $("#sss").progressbar({max:100}); setInterval(changeProgress,100) }); function changeProgress() { current++; if(current>=100){ current=0; } $("#sss").progressbar("option","value",current); }
这个滚动条没隔100毫秒进一小格,到结束时再从初始位置开始进行