我有這樣的投入與非數字的指標與jQuery數組的索引:jQuery的獲得的非數字指標的輸入
<input name="attributes['index1']" class="text_inputs" />
<input name="attributes['index2']" class="text_inputs" />
<input name="attributes['index3']" class="text_inputs" />
這jQuery代碼:
var attrs = new Array();
$.map($('input.text_inputs'), function(obj, idx) {
attrs['here_the_index_from_input'] = obj.value;
});
所以我想將輸入中的每個索引添加到attrs數組索引。 在此先感謝!
不' 'here_the_index_from_input''意味着,例如,'' index1'',' 'index2''和'' index3''? – 2011-06-09 14:44:04