Prova cosi:
codice:<script>.... function checkAll() { var Box = document.getElementsByTagName("input"); for (i = 0; i < Box.length; i++){ if(Box[i].getAttribute("type")=="checkbox"){ Box[i].checked = true ;} } } </script> <form name="adminGallery"> <input type="checkbox" name="del[]" /> Select <input type="checkbox" name="del[]" /> Select <input type="checkbox" name="del[]" /> Select <input type="checkbox" name="del[]" /> Select </form> <button onclick="checkAll()">Select All</button>![]()

Rispondi quotando