js获取文件路径,结果都是C:\fakepath的问题

2024-10-12 00:28:57

1、编写demo.htmldemo.html代码如下:<!DOCTYPE html><html><head>稆糨孝汶;<script type="text/script" src="demo.js"</script></head><body><input id="selectFileInput" type="file" multiple="multiple" list="fileList" /></body></html>

js获取文件路径,结果都是C:\fakepath的问题

3、获取路径和原因分析js获取文件路径为:“C:\fakepath”;原因分析:window系统为了安全考虑,不让从客户端获取文件路径,统一使用C:\fakepath代替。

js获取文件路径,结果都是C:\fakepath的问题
猜你喜欢