jquery下将选择的checkbox的id组成字符串的方法
作者:Terry2017.02.03来源:Web前端之家浏览:13125评论:0
varcolorvalues = new
Array();
$('#image-colors').find('.color-
block').
each(
function(){
if($(
this).find('span').eq(0).has
class('
selected')){
colorValues.push($(this).
attr('
title'));
}
});
var color
string = colorValues.
join(',');
alert(color
String);
温馨提示:本文作者系
Terry ,经
Web前端之家编辑修改或补充,转载请注明出处和
本文链接:https://jiangweishan.com/article/svg1486051200942.html
网友评论文明上网理性发言已有0人参与
发表评论: