checkbox单选
$(':checkbox[class=topcheckbox]').each(function () { $(this).click(function () { if ($(this).attr('checked')) { $(':checkbox[class=topcheckbox]').removeAttr('checked'); $(this).attr('checked', 'checked'); } }); });
$(':checkbox[class=topcheckbox]').each(function () { $(this).click(function () { if ($(this).attr('checked')) { $(':checkbox[class=topcheckbox]').removeAttr('checked'); $(this).attr('checked', 'checked'); } }); });