<!DOCTYPE html><html><body> <input type="file" id='up' oninput="get()" /> <script> function get() { let fup = document.getElementById('up'); console.log("本地文件路径:" + fup.value) } </script></body></html>