获取<;值的javascript代码;输入类型=文件>;仅返回firefox中的文件名
可能重复:获取<;值的javascript代码;输入类型=文件>;仅返回firefox中的文件名,javascript,Javascript,可能重复: 函数的作用是:返回IE中标记中所选文件的正确完整路径。。但它只返回firefox中的文件名。。请帮忙。我需要所有浏览器中的完整路径名 getImage() { var location=document.getElementbyId("photo").value; } <body> <input type=file; id=photo;> </body> getImage(){ var location=document.
函数的作用是:返回IE中标记中所选文件的正确完整路径。。但它只返回firefox中的文件名。。请帮忙。我需要所有浏览器中的完整路径名
getImage() {
var location=document.getElementbyId("photo").value;
}
<body>
<input type=file; id=photo;>
</body>
getImage(){
var location=document.getElementbyId(“照片”).value;
}
较新的浏览器实现不允许您访问完整的文件名。您只需处理它…由于存在安全风险,您很可能无法执行此操作。您可能需要它做什么?