function checkone(){? ? ? ? ? ? var j=document.getElementById("wb").value;?var hobby=document.getElementById("hobby"+j);? ? ? ? ? ? hobby.checked=true;? ? ? ? ? ?if(parseInt(j)>6||parseInt(j)<1)? ? ? ? ? ? {? ? ? ? ? ? ? ? alert("請輸入1-6之間的數(shù)字");? ? ? ? ???}}為什么在調(diào)用上面函數(shù)的時候,if語句沒有效果,但放到給j賦值那行語句后面就可以正常執(zhí)行。
有沒有好心人,幫我解答下下面的情況關于JS代碼執(zhí)行的問題
neilyosql
2016-11-22 23:26:09