how to "browse for folder" in htmljavaScriptJquery - Stack Overflow

<input type="file"> only allows the user to browse for files.How about "browse for

<input type="file"> only allows the user to browse for files.

How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what are the other approaches.

please advise. thanks!!

<input type="file"> only allows the user to browse for files.

How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what are the other approaches.

please advise. thanks!!

Share Improve this question edited Aug 26, 2012 at 9:40 Sathish asked Aug 26, 2012 at 9:35 SathishSathish 4,7137 gold badges34 silver badges53 bronze badges 5
  • I think that if you are trying to upload the contents of a folder you have resort to multiple <input>'s... Still, +1 – 11684 Commented Aug 26, 2012 at 9:42
  • Why would you want that? Then you could just ask the user to type the name of the folder! – 11684 Commented Aug 26, 2012 at 9:45
  • can you tell a bit more about why you have to select the folder to save the file? Can't we just select file/files directly? – woodykiddy Commented Aug 26, 2012 at 9:51
  • After your ments, this question doesn't make any sense. Inputs are for uploading data, not downloading! – lqc Commented Aug 26, 2012 at 10:12
  • have a look at this link dude tek-tips./faqs.cfm?fid=5201 im sure there is an option – Sathish Commented Aug 26, 2012 at 10:18
Add a ment  | 

3 Answers 3

Reset to default 0

As long as you're building a website, there is no other option to save a file on the clients puter then to let him/her download it, which will (as stated in my ment) go to his download folder, or present him a dialog to let him choose a directory.

You can do multiple file select dialog with flash, but for folder on client machine, that needs to go with Java applet at least.

Try this,

<input type="file" webkitdirectory multiple/>

Note: "webkitdirectory" won't work on IE, It will works as "browse for file" dialog".

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745351026a4623832.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信