Skip to content
Related Articles

Related Articles

HTML | DOM Input FileUpload value Property

Improve Article
Save Article
Like Article
  • Difficulty Level : Basic
  • Last Updated : 11 Oct, 2019

The Input FileUpload value Property is used to returns the path or the name of the file selected with the element.
This property is used to return the name of the selected file with a fake path in IE, Google Chrome, and Opera, and return the name of the selected file in Firefox and Safari. This property is read-only, because of security reasons.



Example: Return the “path”.

<!DOCTYPE html>
        HTML DOM Input FileUpload value
        h1 {
            color: green;
          Geeks for Geeks
        <input type="file" 
        <p id="demo"></p>
        <button onclick="myFunction()">
            function myFunction() {
                var x =
                    "demo").innerHTML = x;

Before Clicking the Button:

After Clicking the Button:

Supported Browsers:

  • Google Chrome
  • Mozilla Firefox
  • Edge 10.0
  • Opera
  • Apple Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!