Input Number type Attribute

Definition and Usage

type The attribute returns what type of form element the numeric field is.

For the input number, this property will always return "number".

Example

Returns the type of form element for the numeric field:

var x = document.getElementById("myNumber").type;

Try It Yourself

Syntax

numberObject.type

Technical Details

Return Value: A string value that represents the form element type of a numeric field.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 10.0 Support Support Support