52,792
社区成员




$("input[type=checkbox][id^='" + s_ParentID + "']").each(function (i)
{
alert($(this).text());
})
function CheckParent(id)
{
var s_ParentID = id.substring(0, id.indexOf('_'));
if (!$("input[type=checkbox][id='" + s_ParentID + "']").is(":checked"))
{
$("input[type=checkbox][id='" + s_ParentID + "']").attr("checked", true);
}
else
{
var l = $("input[type=checkbox][id^='" + s_ParentID + "']");
var tf = false;
$.each(l, function (idx, item)
{
if (s_ParentID != $(item)[0].id)
{
if ($("input[type=checkbox][id='" + $(item)[0].id + "']").is(":checked"))
{
tf = true;
}
}
})
$("input[type=checkbox][id='" + s_ParentID + "']").attr("checked", tf);
}
}
var s = $("input[type=checkbox][id^='" + s_ParentID + "']:checked").map(function(){return this.value;}).get().join();
alert(s)