如何在用户使用jquery上传文件时提取整个路径 [英] How to extract the entire path when a user uploads a file using jquery

查看:179
本文介绍了如何在用户使用jquery上传文件时提取整个路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图提取用户在浏览器上上传的文件的整个路径,这需要使用javascript或jquery。



如果我给($(#userfile).val()); 我只能提取文件名,而不是整个路径。

有人可以帮我解决这个问题吗?解决方案

Internet Explorer会给你完整的路径,但其他浏览器不会。 这里是一个例子页面,我发现演示此


I am trying to extract the entire path of the file that a user uploads on the browser and this i need to do using javascript or jquery.

If i give ($("#userfile").val()); i am able to extract only the file name and not the entire path.

Could someone please help me with this?

解决方案

Internet explorer will give you the full path, but other browsers won't. here's an example page i found that demonstrates this

这篇关于如何在用户使用jquery上传文件时提取整个路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆