Will this check if inside a form the box named "number" equals the random number? I can't seem to get it working.Code:var ranNum= Math.floor(Math.random()*5); function getNum() { var guessNum= getElementsByName("number"); } function checkNum() { if (ranNum==guessNum) { alert("You win!") } else { alert("You lose!") } }



Reply With Quote




Bookmarks