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.
精彩评论