2014年1月23日 星期四

checkBox只能單選

    //設定checkBox 只能單選
    $("#AlbumList table").delegate("input[name='albumItem']", "click", function () {
        var isCheck = $(this).prop("checked");
        if (isCheck) {
            $("#AlbumList table input[name='albumItem']").prop("checked", false);
            $(this).prop("checked", true);
        }
    });

沒有留言:

張貼留言