在网上看到很多cgi做的多文件上传,不过它们选择文件的时候都需要选择一个文件点{确定}按钮然后再选第二个文件,这样一来在传送多文件的时候用户会感觉非常繁琐,我想要的效果是点击网页中的浏览按钮然后在一个文件夹内选择多个文件,点击确定就可以把刚才选择的所有文件都反映在网页中,然后点击上传即可。
还望高人指导,小菜感激不尽!!
------解决方案--------------------------------------------------------
在目前这个阶段看来,lz这个要求恐怕还是满足不了的阿。各主要Browser都不支持这种操作,
连选择文件框的文件类型都无法控制,主要是因为security的问题。
---------------------------------------------------------------------------------------------------
For the time being, only use form-based file upload if you know that the users will have Netscape (for example in an intranet or if the form is just for one person that you know has Netscape) or MSIE 4.0 or later.
An often expressed wish with file uploads is to have a way of suggesting the file type being uploaded. Netscape, for example, when it gives you the file upload dialog box, inexplicably assumes you want to upload an HTML file. Unfortunately, there is no way to suggest a file type.