forms - jQuery solution for dynamically uploading multiple files -


i have form in uploading pictures. don't know how many pictures may upload @ specific time. there jquery/ajax solutions dynamically adding file upload field in form?

simple code adding file field in form using jquery

<form id="myform" action="your-action">      <input type="file" name="files[]" />      <a href="#" onclick="addmorefiles()">add more</a>  </form>  <script>        function addmorefiles(){             $("#myform").append('<input type="file" name="files[]" />')        }   </script> 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -