Progress position Property - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Progress

Description

The position property returns the current position of the progress bar.

This property is read-only.

Return Value

A floating point number, representing the current position of the progress bar

The following code shows how to get the current position of the progress bar:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

Downloading progress://from ww  w . j  a  v a  2  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").position;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials