Latest web development tutorials
 

Progress position Property

Progress Object Reference Progress Object

Example

Get the current position of the progress bar:

var x = document.getElementById("myProgress").position;

The result of x will be:

0.22
Try it Yourself »

Definition and Usage

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

The value of this property is the result of dividing the current value (specified with the value attribute) by the maximum value (specifies with the max attribute).

Note: This property is read-only.

Note: The <progress> element is new in HTML5.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The position property is supported in Internet Explorer 10, Firefox, Opera, Chrome, and Safari 6.

Note: The position property is not supported in Internet Explorer 9 and earlier versions.


Syntax

progressObject.position

Technical Details

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

< Progress Object