11
Jak rozwiązać C: \ fakepath?
<input type="file" id="file-id" name="file_name" onchange="theimage();"> To jest mój przycisk przesyłania. <input type="text" name="file_path" id="file-path"> To pole tekstowe, w którym muszę pokazać pełną ścieżkę do pliku. function theimage(){ var filename = document.getElementById('file-id').value; document.getElementById('file-path').value = filename; alert(filename); } To jest JavaScript, który rozwiązuje mój problem. Ale w wartości alarmowej daje mi C:\fakepath\test.csv …
256
javascript
html
dom
file-upload