function checkone(){
var j =document.getElementById("wb").value;
// 任务3:在文本框中输入输入1-6数值,当点击"确定"按钮时,根据输入的数值,通过id选中相应的复选项。
switch (j) {
case 1:document.getElementById("hobby1").checked = true;break;
case 2:document.getElementById("hobby2").checked = true;break;
case 3:document.getElementById("hobby3").checked = true;break;
case 4:document.getElementById("hobby4").checked = true;break;
case 5:document.getElementById("hobby5").checked = true;break;
case 6:document.getElementById("hobby6").checked = true;
}
}