Input Range name attribute
Definition and Usage
name
Sets or returns the value of the name attribute of the slider control.
The HTML name attribute is used to identify form data submitted to the server, or to reference form data on the client using JavaScript.
Note:Only form elements that have a name attribute will pass their values when submitting the form.
See also:
HTML Reference Manual:HTML <input> name Attribute
Example
Example 1
Get the name of the slider control:
var x = document.getElementById("myRange").name;
Example 2
Change the name of the slider control:
document.getElementById("myRange").name = "newRangeName";
Syntax
Return the name attribute:
rangeObject.name
Set name attribute:
rangeObject.name = name
Attribute Value
Value | Description |
---|---|
name | Specifies the name of the slider control. |
Technical Details
Return Value: | A string value representing the name of the slider control. |
---|
Browser Support
The numbers in the table indicate the first browser version to fully support this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |