checkbox单选

$(':checkbox[class=topcheckbox]').each(function () {
            $(this).click(function () {
                if ($(this).attr('checked')) {
                    $(':checkbox[class=topcheckbox]').removeAttr('checked');
                    $(this).attr('checked', 'checked');
                }
            });
        });
posted @ 2012-10-29 10:04  WEBBER  阅读(473)  评论(0编辑  收藏  举报