Skip to content
Related Articles

Related Articles

HTML | DOM Input Button type Property

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 25 Aug, 2022
View Discussion
Improve Article
Save Article

The DOM Input Button type Property in HTML DOM is used for returning the which type of form element containing the Input Button field is. This Property will always return “Button”.


Return Values: It returns a string value which represents the type of form element a input button field is. 

Below program illustrates the use of Input Button type Property. 
Example 1: 


<!DOCTYPE html>
        h1 {
            color: green;
<body style="text-align:center;">
      DOM Input Button type Property
    <!-- Assigning button id -->
    <input type="button"
    <p id="sudo"
        function myGeeks() {
            // Return Input Button type Property
            var g =
              "sudo").innerHTML = g;

Before Clicking On Button: 

After Clicking On Button: 

Supported Browsers: The browser supported by DOM input Button type property listed below: 

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!