getElementByID
function checkone(){
var j=document.getElementById("wb").value;
var hobby = document.getElementById("hobby"+j);
hobby.checked = true;
}
可以改成
function checkone(){
var j=document.getElementById("wb").value;
var hobby = document.getElementById(j);
hobby.checked = true;
}
为什么要写成
var hobby = document.getElementById("hobby"+j);