WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Button Object


Button Object

The Button object speaks to a HTML <button> element.

Access a Button Object

You can get to a <button> component by utilizing getElementById():

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

Create a Button Object

You can make a <button> component by utilizing the document.createElement() method:

var x = document.createElement("BUTTON");

Button Object Properties

= Property included HTML5.

Property Description
autofocus Sets or returns whether a catch ought to naturally get center when the page loads, or not
disabled Sets or returns whether a catch is debilitated, or not
form Returns a reference to the structure that contains a button
formAction Sets or returns the estimation of the formaction property of a button
formEnctype Sets or returns the estimation of the formenctype property of a button
formMethod Sets or returns the estimation of the formmethod characteristic of a button
formNoValidate Sets or returns whether the structure information ought to be approved or not, on submission
formTarget Sets or returns the estimation of the formtarget trait of a button
name Sets or returns the estimation of the name trait of a button
type Sets or returns the kind of a button
value Sets or returns the estimation of the esteem characteristic of a button