直接上代码:
<input type="file" id="file" multiple webkitdirectory directory/><button onclick="uploadFiles()" id="btn_upload" style="width: 100px; font-size: 16px;">确定上传</button>
另外获取地址栏中的url参数值:
//获取头部的参数function getQueryString(name) {var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");var r = window.location.search.substr(1).match(reg);if (r != null) return unescape(r[2]);return "";}
done