Latest web development tutorials
 

Progress value Property

< Progress Object

Example

Change the current value in a progress bar:

document.getElementById("myProgress").value = "75";
Try it Yourself »

Definition and Usage

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.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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.


Syntax

Return the value property:

progressObject.value

Set the value property:

progressObject.value=number

Property Values

Value Description
number Specifies how much of the task has been completed

Technical Details

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

More Examples

Example

Get the current value of a progress bar:

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

The result of x will be:

75
Try it Yourself »

Related Pages

HTML reference: HTML <progress> value attribute


< Progress Object