THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Input Button Object


Input Button Object

The Input Button object speaks to a HTML <input> component with type="button".

Access an Input Button Object

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

var x = document.getElementById("myBtn"); Try it

Create an Input Button Object

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

var x = document.createElement("INPUT");
x.setAttribute("type", "button");
Try it

Input Button Object Properties

= Property included HTML5.

Property Description
autofocus Sets or returns whether an information catch ought to naturally get center when the page loads
defaultValue Sets or returns the default estimation of an information button
disabled Sets or returns whether an info catch is impaired, or not
form Returns a reference to the structure that contains the information button
name Sets or returns the estimation of the name quality of an info button
type Returns which sort of structure component the info catch is
value Sets or returns the estimation of the esteem trait of an information button

Standard Properties and Events

The Input Button object additionally bolsters the standard properties and events.