Input FileUpload value Property
Example
Display the path or the name of the selected file:
var x = document.getElementById("myFile").value;
Try it Yourself »
Description
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
Property | |||||
---|---|---|---|---|---|
value | Yes | Yes | Yes | Yes | Yes |
Syntax
fileuploadObject.value
Technical Details
Return Value: | A String, representing the path or the name of the selected file |
---|
❮ Input FileUpload Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.