<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
3 Answers
Reset to default 0As 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条)