“.value”是怎么添加上去的,語法嗎?
function checkone(){
? ? ? ? ? ? var j=document.getElementById("wb").value;
? ? ? ? ? ? if(parseInt(j)>6||parseInt(j)<1)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? alert("請輸入1-6之間的數字");
? ? ? ? ? ? }
? ? ? ? ? ? var hobby=document.getElementsByName("hobby");
? ? ? ? ? ? hobby[parseInt(j)-1].checked=true;
中,var j=document.getElementById("wb").value;的“.value”是怎么添加上去的,語法嗎?
2015-08-25
語法。就是元素有個屬性是value。