Home>

First, js code:

<script type="text/javascript">
  var progressid="progressbarid";
  function setprogressbar (progress) {
   if (progress) {
    $("#" + progressid + "&div"). css ("width", string (progress) + "%");
    $("#" + progressid + "&div"). html (string (progress) + "%");
   }
  }
  var i_progressbar=0;
  function doprogressbarloading () {
   if (i_progressbar&100;{
    alert ("Loading completed!"! ");
    return;
   }
   if (i_progressbar<= 100) {
    settimeout ("doprogressbarloading ()", 10);
    setprogressbar (i_progressbar);
    i_progressbar ++;
   }
  }
  function setprogressbarcss () {
   $("#" + progressid + "") .css ({"width":"300px", "height":"25px"});
   $("#" + progressid + "&div"). css ({"height":"25px", "background-color":"#e0e0e0", "text-align":"center"});
  }
  $(document) .ready (function () {
   setprogressbarcss ();
   doprogressbarloading ();
  });
</script>

Second, html code:

<div>
 <div>
 </div>
</div>
  • Previous AngularJS basic ng-include directive example explained
  • Next 3 ways to implement paging in php