jQuery gets the value of multiple input boxes with the same name
$('input[name=名字]').each(function () {
console.log($(this).val()) ;
})
// 获取到所有name为sphone的input表单的输入值,并以逗号分割的字符串形式传出
var sphone = '';
$('input[name=sphone]').each(function () {
sphone += $(this).val() + ',';
})
console.log(sphone.substring(0,sphone.length -1)) // 获取到以逗号分割的字符串