WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Input Number Object


Input Number Object

The Information Number Object is new in HTML5.

The Input Number item speaks to a HTML <input> component with type="number".

Note: <input> components with type="number" are not upheld in Web Explorer 9 and prior versions.

Access an Input Number Object

You can get to a <input> component with type="number" by utilizing getElementById():

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

Tip: You can likewise get to <input type="number"> via looking through the elements accumulation of a form.

Create an Input Number Object

You can make a <input> component with type="number" by utilizing the document.createElement() method:

var x = document.createElement("INPUT");
x.setAttribute("type", "number");

Input Number Object Properties

Property Description
autocomplete Sets or returns the estimation of the autocomplete trait of a number field
autofocus Sets or returns whether a number field ought to naturally get center when the page loads
defaultValue Sets or returns the default estimation of a number field
disabled Sets or returns whether a number field is crippled, or not
form Returns a reference to the structure that contains the number field
list Returns a reference to the datalist that contains the number field
max Sets or returns the estimation of the maximum quality of a number field
min Sets or returns the estimation of the min property of a number field
name Sets or returns the estimation of the name property of a number field
placeholder Sets or returns the estimation of the placeholder characteristic of a number field
readOnly Sets or returns whether the number field is perused just, or not
required Sets or returns whether the number field must be rounded out before presenting a form
step Sets or returns the estimation of the progression trait of a number field
type Returns which kind of structure component the number field is
value Sets or returns the estimation of the esteem quality of a number field