<input type="file" name="pic[]" multiple="true"/>
input点击可选择多个,怎么读取上传了多少个,和分别的名字我试着 $('input').val();可是只能读取第一个名字,后面的没读到
越努力越幸运!!!
jq Problem reading multiple values from input content? -PHP Chinese website Q&A-jq Problem reading multiple values from the input content? -PHP Chinese website Q&A
Let’s take a look and learn.
var values = []; $('input').each(function(i, obj){ values.push($(this).val()); }console.log(values); //all inputs value
jq Problem reading multiple values from input content? -PHP Chinese website Q&A-jq Problem reading multiple values from the input content? -PHP Chinese website Q&A
Let’s take a look and learn.