function changeSelect(fobj1,isChecked) { var chk = document.getElementsByName(fobj1); for (var i=0;i<chk.length; i++){ if(chk[i].checked){ chk[i].checked = false; }else{ chk[i].checked = true; } } }var check=true; function changeSelect(fobj1,isChecked) { check = !isChecked; var chk = document.getElementsByName(fobj1); for (var i=0; i<chk.length; i++){ if(chk[i].type='checkbox'){ chk[i].checked = isChecked; } } }
沒有留言:
張貼留言