Input Range name Property
Example
Get the name of the slider control field:
var x = document.getElementById("myRange").name;
x
The output is:
points
Try it »
Definition and Usage
The name property sets or returns the value of the name attribute of the slider control.
The name attribute is typically used as the identifier for submitting form data to the server, or as a reference identifier for JavaScript on the client side.
Note: Data can only be submitted to the server after the form is submitted if the name attribute is set.
Browser support





All major browsers support the name attribute
Note: Internet Explorer 9 and earlier versions do not support the HTML using the type="range" attribute .
Syntax
Return the name attribute:
rangeObject
.name
Set the name attribute:
rangeObject
.name=
name
Attribute values
| Value | Description |
|---|---|
| name | Describes the name of the slider control |
Technical Details
| Return Value: | A string representing the name of the slider control |
|---|
More examples
Example
Modify the name of the slider control:
document.getElementById("myRange").name = "newRangeName";
Try it »
Related pages
HTML Reference Manual: HTML name attribute
Input Range Object