Input Button waarde eigenschap
Definitie en gebruik
waarde
De eigenschap retourneert het pad of de naam van het bestand dat is gekozen met het <input type="file">-element.
Deze eigenschap retourneert de naam van het geselecteerde bestand met een foute pad in IE, Google Chrome en Opera, en de naam van het geselecteerde bestand in Firefox en Safari.
Note:For security reasons, this property is read-only.
Example
Display the path or name of the selected file:
var x = document.getElementById("myFile").value;
Syntax
fileuploadObject.value
Technical details
Return value: | A string value that represents the path or name of the selected file. |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |