Spring mvc 多文件上传 每个文件加一个效力范围

controller 
                                lawDO.setEffectId(Integer.valueOf(request
                                        .getParameter("status" + index)));

js
var i=1;
    function  addUploadButton(){ 
        
         //  按ID找到FOrm
         var  uploadForm = document.getElementById( "uploadForm" );    
        
         //  创建P元素
         var  pNode = document.createElement( "p" );
        
         //  累加Count以观察次数
        var effectSelect = " 效力范围 <select name='status"+(i++)+"'"+ "class='input input-auto'>";
        effectSelect += "<option value ='1102' selected='selected' >法律</option>";
        effectSelect += "<option value ='1103' >司法解释</option>";
        effectSelect += "<option value ='1104'>行政法规</option>";
        effectSelect += "<option value ='1105'>规章及其他</option>";
        pNode.innerHTML = " <input type='file' name='myfiles' value='浏览文件'/> "+effectSelect ;
        
         //  将P元素添加到body中
        uploadForm.appendChild(pNode);
    }

你可能感兴趣的:(Spring mvc 多文件上传 每个文件加一个效力范围)