input点击可选择多个,怎么读取上传了多少个,和分别的名字我试着 $('input').val();可是只能读取第一个名字,后面的没读到"> jq 读取 input 内容多个值的问题?-PHP Chinese Network Q&A
jq 读取 input 内容多个值的问题?
素颜
素颜 2017-03-29 09:29:52
0
2
1274

input点击可选择多个,怎么读取上传了多少个,和分别的名字我试着 $('input').val();可是只能读取第一个名字,后面的没读到


素颜
素颜

越努力越幸运!!!

reply all (2)
数据分析师

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


      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!