获取同一name的input的value值
| <input type='text' name='cflx' id='cflx0' value='1'> <input type='text' name='cflx' id='cflx1' value=2'> <input type='text' name='cflx' id='cflx2' value='3'> |
-----js写法如下
$(function(){
$("input[name='cflx']").each(function(index,item){
alert($(this).val())
}
);
});
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2524/viewspace-2817129/ ,如需转载,请注明出处,否则将追究法律责任。