THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Progress max Property

Progress Object Reference 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

Internet Explorer Firefox Opera Google Chrome Safari

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

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


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 Reference Progress Object