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

HTML DOM Progress max Property

Progress max Property

Progress Object Reference Progress Object

Example

Modify the maximum value of the progress bar:

document.getElementById("myProgress").max="50";

Try it »


Definition and Usage

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

The max attribute describes the value needed for the progress bar to complete the task.

Note: The element is new.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

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


Syntax

Return the max property:

progressObject

.max

Set the max property:

progressObject

.max=

number

Attribute values

Value Description
number Describes the value needed to complete all tasks

Technical Details

Return Value: A floating-point number representing the value needed to complete all tasks

More examples

Example

Get the maximum value of the progress bar:

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

x

The output is:

100

Try it »

Related pages

HTML Reference Manual: HTML max property


Progress Object Reference Progress Object