HTMLInputElement has no method 'val'

前端 未结 5 921
走了就别回头了
走了就别回头了 2021-02-05 02:28

I\'m looping through cells in a table row. each cell has a text box in it, and I want to take the value of the text box and push it onto an array.

function dothi         


        
5条回答
  •  臣服心动
    2021-02-05 03:01

    function dothing() {
        var tds = $('#'+selected+' td');
        var submitvals = new Array();
        tds.each(function(i) {
            var val = $($(this).children('input')[0]).val();
            submitvals.push(val);
        });
    }
    

提交回复
热议问题