最新回答 / 慕村6055097
function checkall(){ var hobby = document.getElementsByTagName("input"); for(var i = 0; i < hobby.length; i++){ if(hobby[i].name == "hobby"){ hobby[i].checked = true; } } ...