Skip to content
Related Articles

Related Articles

Improve Article

HTML | DOM Input Image type Property

  • Last Updated : 27 Aug, 2019

The Input Image type Property in HTML DOM is used to returning the which type of form element an image field is.



Return Value: It returns a string value which represents the type of form element the Image field is.

Below Example returns the Image Type Property.


<!DOCTYPE html>
        HTML DOM Input Image type Property
<body style="text-align:center;">
    <h1 style="color:green;"
    <h2>DOM Input Image Type Property</h2>
    <button onclick="my_geek()">
        <input id="myImage"
    <h2 id="Geek_h" 
        function my_geek() {
            // Return formTarget,
          //ormEnctype and formAction. 
            var txt = document.getElementById(
                "Geek_h").innerHTML = txt;

Before Clicking On Button:

After Clicking On Button:

Supported Browsers: The browsers supported by DOM Input Image type Property are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :