Open In App

HTML DOM Input Button Object

Last Updated : 14 Jun, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

The DOM Input Type Button Object is used to represent the HTML <input> element with type="button". The Input Type Button element is accessed by getElementById().

Syntax:  

document.getElementById("ID");

Where “id” is the ID assigned to the “input” tag.

Example 1: In this example, we will see the use of the DOM Input Button Object

Output:

 

Example 2: Input button Object can be created by using the document.createElement method. 

Output:

 

Supported Browsers: The browser supported by DOM Input button Object are listed below: 

  • Google Chrome 1 and above
  • Firefox 1 and above
  • Opera
  • Safari 1 and above
  • Edge 12 and above

Next Article
Practice Tags :

Similar Reads