YouTip LogoYouTip

Prop Number Type

HTML DOM Input Number type Property

HTML DOM Input Number type Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

<input> - month

<input> - range

Input Number type Property

Input Number Object Reference Input Number Object

Example

Return the form element type of the number field:

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

x output will be:

number

Try it yourself Β»


Definition and Usage

The type property returns the form type of the number field.

In input number, this property usually returns "number".


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The type property is supported by all major browsers.

Note: Internet Explorer 9 and earlier do not support the <input> element with the type="number" attribute.


Syntax

numberObject.type

Technical Details

Return Value: A string representing the form element type of the number field.

Input Number Object Reference Input Number Object

<input> - month

<input> - range

iFlytek Xingchen Coding Plan includes free model call quota, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform. Configuration Guide Β₯3.9/month Subscribe Now

Click to share notes

Cancel

Write notes...

Image URL

Image description

Image size Γ—

Share notes

  • Nickname: Nickname (
← Prop Number ValueProp Number Required β†’