Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Progress value Property

Progress value Property

Progress Object Reference Progress Object

Example

Modify the current value of the progress bar:

document.getElementById("myProgress").value="75";

Try it »


Definition and Usage

The value property sets or returns the value of the value attribute of the progress bar.

The value property describes the progress completed by the current progress bar.

Note: The element is newly added in HTML5.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox, Opera, Chrome, and Safari 6 support the value property.

**Note:** Internet Explorer 9 and earlier versions of IE do not support the value property.


Syntax

Return the value attribute:

progressObject

.value

Set the value attribute:

progressObject

.value=

number

Attribute values

Value Description
number Describes the progress completed by the progress bar

Technical Details

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

More examples

Example

Get the current value (progress) of the progress bar:

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

x

The output is:

75

Try it »


Related pages

HTML Reference Manual: HTML value attribute


Progress Object Reference Progress Object