jquery 复选框取值

xiaoxiao2021-02-28  12

$(function(){  $("input:button").click(function() { text = $("input:checkbox[name='message']:checked").map(function(index,elem) { return $(elem).val(); }).get().join(','); alert("选中的checkbox的值为:"+text); }); });
转载请注明原文地址: https://www.6miu.com/read-800253.html

最新回复(0)