使用jquery获取文件的完整路径 [英] get full path of a file using jquery
本文介绍了使用jquery获取文件的完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用文件上传(输入类型='文件')来上传文件。但我没有得到文件的完整路径?wat是我们需要使用的功能???我用过
var fullPath = $('#fileUpload1')。val();
但我只得到了filename.Please帮我获得完整路径..
I am using file upload (input type='file') to upload files.But i didnt get full path of the file??wat is the function we need to use for this???i have used
var fullPath = $('#fileUpload1').val();
But i got only filename.Please help me to get full path..
推荐答案
('#fileUpload1')。val();
但我只得到了文件名。请帮助我获得完整路径..
('#fileUpload1').val();
But i got only filename.Please help me to get full path..
出于安全原因,您无法设置和无法读取(或者确切地说,当您只读取文件名或伪路径时)val
of< input>< / input>
当类型
是file
...
For security reasons you can't set and can't read (or to be precise, when reading you got only filename or fake path)val
of<input></input>
whentype
isfile
...
试试这个代码..
i能够获得完整路径..
Try this code..
i am able to get the full path..
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script src="JQuery.js" type="text/javascript"></script>
<script type="text/javascript">
这篇关于使用jquery获取文件的完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文