Change the current value in a progress bar:
The value property sets or returns the value of the value attribute of a progress bar.
The value attribute specifies how much of the task has been completed.
Note: The <progress> element is new in HTML5.
The value property is supported in Internet Explorer 10, Firefox, Opera, Chrome, and Safari 6.
Note: The value property is not supported in Internet Explorer 9 and earlier versions.
Return the value property:
Set the value property:
Value | Description |
---|---|
number | Specifies how much of the task has been completed |
Return Value: | A floating point number, representing the current progress of the task |
---|
Get the current value of a progress bar:
The result of x will be:
HTML reference: HTML <progress> value attribute