
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML DOM Input FileUpload type Property
The HTML DOM input FileUpload type property returns the value of type attribute of an <input> element in an HTML document.
Syntax
Following is the syntax −
object.type
Example
Let us see an example of HTML DOM input file upload type property −
<!DOCTYPE html> <html> <head> <style> body{ text-align:center; background-color:#52B2CF; color:#fff; } .btn{ background-color:coral; border:none; height:2rem; border-radius:50px; width:60%; margin:1rem auto; display:block; color:#fff; outline:none; } .show{ font-size:2rem; color:#fff; font-weight:bold; } </style> </head> <body> <h1>DOM fileupload type property example</h1> <input type = "file" class = "file-upload-btn"> <button onclick="getType()" class="btn">Click me to get value of type property</button> <div class="show"></div> <script> function getType() { var fileBtn = document.querySelector(".file-upload-btn"); document.querySelector('.show').innerHTML = fileBtn.type; } </script> </body> </html>
Output
This will produce the following output −
Now click on “orange” button to get the value of type property of input file upload button.
- Related Articles
- HTML DOM Input FileUpload disabled Property
- HTML DOM Input FileUpload files Property
- HTML DOM Input FileUpload name Property
- HTML DOM Input FileUpload form Property
- HTML DOM Input FileUpload value Property
- HTML DOM Input FileUpload required Property
- HTML DOM Input FileUpload accept Property
- HTML DOM Input FileUpload autofocus Property
- HTML DOM Input FileUpload Object
- HTML DOM Input Button type Property
- HTML DOM Input Hidden type Property
- HTML DOM Input Month type Property
- HTML DOM Input Password type property
- HTML DOM Input Radio type property
- HTML DOM Input Range type property

Advertisements