Why the program not run correctly?

Pkerown

New Member
I am beginner to html and asp. I should write code of the program in Notepad. I want the program that when i click on the Random Button, generate a random number and when i click on the Check button, the program compare between my guess and random number. I write this code but when run the program, not show random number and not compare. Why? \[code\]<html><head><script>var numOfGuess=new number(0);var numRandom;var num;function RandomNum(){ numRandom=new number(math.floor(math.random()*100)); response.write(numRandom); numOfGuess=0;} fucntion Guess(){ num=document.getElementById("guess"); var alert=""; if(num.value<numRand){ alert="grater than!"; numOfGuess++; } esle if (num.value>numRand){ alert="lower than!";] numOfGuess++; } else{ alert="equal!"; numOfGuess++;}document.getElementById("message").innerHtml=alert;}</script></head><body><input type="text" id="guess"><input type="submit" onClick='RandomNum()' value="http://stackoverflow.com/questions/14055779/Random"><p id="message"></p><input type="submit" onClick='Guess()' value="http://stackoverflow.com/questions/14055779/Check"></body></html>\[/code\]Thanks for help.Cheers.
 
Back
Top