Progress value Property - Get the current value of a progress bar: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Progress

Description

Progress value Property - Get the current value of a progress bar:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

Downloading progress:/*from  w w  w.j  a va2  s  .c  o  m*/
<progress id="myProgress" value="22" max="100">
</progress>

<button onclick="myFunction()">Test</button>

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

<script>
function myFunction() {
    var x = document.getElementById("myProgress").value;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials