複数のチェックボックスでから最低1つ選んでいるかを判定する状況が結構あったので シンプルにまとめたものを作ってみました。 「input」タグに「group」属性を追加して 同じ値に設定された中でチェックを付けた数で判定します。 動作確認済: Chromeのみ 要jQuery $("input[group='group1']").click(function(){ // チェックを付けた数を取得する if($("input[group='group1']:checked").length > 0){ $("#msg").html("OK!!"); } else { $("#msg").html("どれか最低1つチェックを付けてください。"); } }); <div id="msg">どれか最低1つチェックを付けてください。</div> <ul> <li><input type="checkb
![チェックボックスで最低1つ選んでいるかを判定する - jsdo.it - Share JavaScript, HTML5 and CSS](https://cdn-ak-scissors.b.st-hatena.com/image/square/f7ea4ff2624993a18dbfc2339ca95ecf281b73f3/height=288;version=1;width=512/http%3A%2F%2Fjsdo-static-contents.s3.amazonaws.com%2Fimages%2Fcapture%2Ff%2Fn%2FZ%2FfnZDS.jpg%3Ft%3D1378422754)