输出

示例代码

This is a demo for <progress> tag in Forms.

HTML:

  <progress id="p" max=100></progress>
  <script>
    var progressBar = document.getElementById('p');
    var newValue = 0;
    function updateProgress() {
      progressBar.value = newValue;
      newValue++;
      if(newValue>=100) newValue=0;
    }
    setInterval(updateProgress,500);
  </script>