查看效果:http://hovertree.com/texiao/jquery/32/
代碼如下:
<div id="hvtTItems"><input type=radio name=tikuHovertree id=tkHovertree0 value=A checked="checked" /><label for="tkHovertree0">A、echo hovertree;</label>
<br /><input type=radio name=tikuHovertree id=tkHovertree1 value=B /><label for="tkHovertree1">B、echo Hover Tree;</label>
<br /><input type=radio name=tikuHovertree id=tkHovertree2 value=C /><label for="tkHovertree2">C、echo 'hovertree';</label>
<br /><input type=radio name=tikuHovertree id=tkHovertree3 value=D /><label for="tkHovertree3">D、 echo 'HoverTree';</label></div>
<input type="button" id="csHovertree" value="取消選中" />
<script src="http://hovertree.com/ziyuan/jquery/jquery-1.12.1.min.js"></script>
<script>
$("#csHovertree").on("click", function () {
//alert($("input[checked='checked']").length); //顯示選中的數量
$("input[name=tikuHovertree][type=radio]").attr('checked', false);
// $("input[type=radio]").attr('checked', false);
})
</script>
效果如下: