Latest web development tutorials

HTML DOM Input Range name attribute

Input Range Object Reference Input Range Object

Examples

Get slider control Field Name:

var x = document.getElementById("myRange").name;
x The output is:
points

try it"

Definition and Usage

name attribute is used to set or return the name attribute value of the slider control.

name attribute is typically used to server identifiers submitted form data, or the client as a Javascript reference identification.

Note: Only the name attribute is set, in the form submission to submit data to the server.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support attribute name

Note: Internet Explorer 9 and earlier versions of IE do not support the use of type = HTML <input> element "range" attribute.


grammar

Returns the name attribute:

rangeObject .name

Setting name attribute:

rangeObject .name= name

Property Value

描述
name 描述了滑块控件的名称

technical details

return value: A string representing the name of the slider control


More examples

Examples

Modify the name of slider control:

document.getElementById("myRange").name = "newRangeName";

try it"


Related Pages

HTML Reference Manual: HTML <the INPUT> name attribute


Input Range Object Reference Input Range Object