Get Progress Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Progress


The Progress object represents an HTML <progress> element.

You can access a <progress> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<progress id="myProgress" value="75" max="100">

<button onclick="myFunction()">get the current progress value</button>

<p id="demo"></p>

function myFunction() {//from  ww  w  .  j  av a 2s  .c o  m
    var x = document.getElementById("myProgress").value;
    document.getElementById("demo").innerHTML = x;


Related Tutorials