Jquery单选框、复选框 根据name取值 (转)

1、单选框:jQuery("input[name='WaterIDForFee']:checked").val()

2、复选框:function GetCheckBox()
{
var str="";
jQuery("input[name='WaterIDForFee']:checked").each(function(){
str += (str==""?"":",") + $(this).val();
})
return str;
}

猜你喜欢

转载自frank1998819.iteye.com/blog/2079681
今日推荐