HTML | DOM Input FileUpload form Property
The Input FileUpload form property in HTML DOM is used to return a reference to the form containing the file upload button. This is a read-only property and returns a form object on success.
Syntax:
fileuploadObject.form
Example:
<!DOCTYPE html> <html> <head> <title> DOM Input FileUpload form Property </title> </head> <body> <center> <h1 style="color:green;"> GeeksForGeeks </h1> <h2> DOM Input FileUpload form Property </h2> <form id="gfgForm"> Select a file to upload: <input type="file" id="myFile"> </form> <button onclick="myFunction()"> Click </button> <p id="demo"> </p> <script> function myFunction() { var frmid = document.getElementById( "myFile").form.id; document.getElementById( "demo").innerHTML = frmid; } </script> </center> </body> </html> |
chevron_right
filter_none
Output:
Before:

After:

Supported Browsers: The browser supported by DOM Input FileUpload form Property are listed below:
- Google Chrome
- Internet Explorer 10.0 +
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | DOM Input FileUpload name Property
- HTML | DOM Input FileUpload value Property
- HTML | DOM Input FileUpload autofocus Property
- HTML | DOM Input FileUpload accept Property
- HTML | DOM Input FileUpload multiple Property
- HTML | DOM Input FileUpload disabled Property
- HTML | DOM Input FileUpload type Property
- HTML | DOM Input FileUpload required Property
- HTML | DOM Input FileUpload files Property
- HTML | DOM Input URL form Property
- HTML | DOM Input Time form Property
- HTML | DOM Input Text form Property
- HTML | DOM Input Password form Property
- HTML | DOM Input Submit form Property
- HTML | DOM Input Image form Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



