开发者

How do you send File paths from html file inputs via Ajax?

开发者 https://www.devze.com 2023-02-14 19:26 出处:网络
How do you send File path开发者_如何学编程s from html file inputs via Ajax?i tried to get it in chrome but it returned unexpected value it may be for security reasons

How do you send File path开发者_如何学编程s from html file inputs via Ajax?


i tried to get it in chrome but it returned unexpected value it may be for security reasons


//i have an input of file type with name image_file
//<input type=​"file" name=​"image_file"/>​
var path = $('input[type=file][name=image_file]').val();
alert(path);
/*
i got "C:\fakepath\wattan-company-view.gif"
but it is in E:\..., but IE i don't know its behavior especially its earlier versions
*/

what i want to know is what will you need the path for????? if you want to upload with ajax iframe post form jquery plugin its very easy to use

0

精彩评论

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