<div class="codetitle"> <span><a style="CURSOR: pointer" data="29377" class="copybut" id="copybut29377" onclick="doCopy('code29377')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code29377"> <br>$(function(){ <br>$(':checkbox[name=flag]').each(function(){ <br>$(this).click(function(){ <br>if($(this).attr('checked')){ <br>$(':checkbox[name=flag]').removeAttr('checked'); <br>$(this).attr('checked','checked'); <br>} <br>}); <br>}); <br><br>}); <br><br><input name="flag" id="agree" type="checkbox" checked value="0"> 同意 <br><input name="flag" id="reject" type="checkbox" value="1"> 不同意 <br> </div>