Get Progress Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Progress

Introduction

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>
<html>
<body>

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

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

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

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

</body>
</html>

Related Tutorials