Progress max attribute
Definition and usage
max
Attribute sets or returns the value of the progress bar's max attribute.
progress max attribute Define the total amount of work required for a task to be considered complete.
See also:
HTML Reference Manual:HTML <progress> Tag
Instance
Example 1
Modify the maximum value in the progress bar:
document.getElementById("myProgress").max = "50";
Example 2
Get the maximum value of the progress bar:
var x = document.getElementById("myProgress").max;
Syntax
Return max attribute:
progressObject.max
Set max attribute:
progressObject.max = number
Attribute value
Value | Description |
---|---|
number | Specifies the total workload required for the task to be considered complete. |
Technical Details
Return Value: | A floating-point number representing the total workload required for the task. |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | 6.0 | Support |
Related Pages
HTML Reference Manual:HTML <progress> max Attribute