THE WORLD'S LARGEST WEB DEVELOPER SITE

Progress max Property

❮ Progress Object

Example

Change the maximum value in a progress bar:

document.getElementById("myProgress").max = "50";
Try it Yourself »

Definition and Usage

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

The max attribute specifies how much work the task requires in total before it can be considered complete.

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


Browser Support

Property
max Yes 10.0 Yes 6.0 Yes


Syntax

Return the max property:

progressObject.max

Set the max property:

progressObject.max = number

Property Values

Value Description
number Specifies how much work the task requires in total before it can be considered complete

Technical Details

Return Value: A floating point number, representing how much work the task requires in total

More Examples

Example

Get the maximum value of a progress bar:

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

The result of x will be:

100
Try it Yourself »

Related Pages

HTML reference: HTML <progress> max attribute


❮ Progress Object