标签:i++ asc put 单选框 复选框 span onclick checked 隐藏
<input type="checkbox" name="checkname" onclick="check(this)"/>左 <input type="checkbox" name="checkname" onclick="check(this)"/>右 <div id="show" style="display:block;">显示</div> <div id="hidden" style="display:none;">隐藏</div> <script type="text/javascript"> function check(obj){ var checks = document.getElementsByName("checkname"); if(obj.checked){ for(var i=0;i<checks.length;i++){ checks[i].checked = false; } obj.checked = true; }else{ for(var i=0;i<checks.length;i++){ checks[i].checked = false; } } document.getElementById(‘show‘).style.display = document.getElementById(‘show‘).style.display=="none"?"block":"none"; document.getElementById(‘hidden‘).style.display = document.getElementById(‘hidden‘).style.display=="none"?"block":"none"; } </script>
标签:i++ asc put 单选框 复选框 span onclick checked 隐藏
原文地址:http://www.cnblogs.com/lusid/p/6100870.html