input上传文件个数控制
HTML: 1 <h3>请上传[2,5]个文件</h3> 2 <form action="" enctype="multipart/form-data"> 3 <input type="file" name="file" multiple="multiple" id="file" onchange="fileCountCheck(this,2,5)" /> 4 </form> JavaScript: 1 /** 2 * [fileCountCheck 上传文件数量检测] 3 * @param {[Object]} filesObj [文件对象] 4 * @param {[Number]} minFileNum [文件数量下限] 5 * @param {[Number]} maxFileNum [文件数量上限] 6 * @return {[Boolean]} [真假] 7 */ 8 function fileCountCheck(filesObj, minFileNum, maxFileNum) { 9 10 // consol...