X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Input FileUpload value Property

Input FileUpload Object Reference Input FileUpload Object

Example

Display the path or the name of the selected file:

var x = document.getElementById("myFile").value;

Try it yourself »


Definition and Usage

The value property returns the path or the name of the file selected with the <input type="file"> element.

This property returns the name of the selected file with a fake path in IE, Google Chrome, and Opera, and the name of the selected file in Firefox and Safari.

Note: This property is read-only, because of security reasons.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The value property is supported in all major browsers.


Syntax

fileuploadObject.value

Technical Details

Return Value: A String, representing the path or the name of the selected file


Input FileUpload Object Reference Input FileUpload Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook