开发者

jquery input file missing text

When I get the text from a input element that has the type of file

$("#selected-file").val() or .text()
//only retur开发者_JAVA技巧ns the name of the file selected. not the entire path

how can I get all of the text from the element?


You cannot get the full local path of a file. (for security reasons)

Also it is not much use, since you do not have access to the local maching..


It is based upon the browser. you have to use some user defined function to get filename.

try by spliting the url by / and get the last array element.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜