1<script type="text/javascript">
2function selectFolder(e) {
3 var theFiles = e.target.files;
4 var relativePath = theFiles[0].webkitRelativePath;
5 var folder = relativePath.split("/");
6 alert(folder[0]);
7}
8</script>
9
10<input type="file" id="FileUpload" onchange="selectFolder(event)" webkitdirectory mozdirectory msdirectory odirectory directory multiple />
11
12