Guess Game
function validate(guessform){
if(guessform.guessNum.value.length==0){
alert("please input your guess!");
guessform.guessNum.select();
return false;
}
if(isNaN(guessform.guessNum.value)){
alert("please input a number!");
guessform.guessNum.select();
return false;
}
return true;
}
Number Guess Game
if(!game.isSuccess()){
%>
please input your guess between 1 and 100:
your guess:
}
%>
if(game.getMessage()!=null){
%>
}
%>
you have got
if(game.isSuccess()){
%>
play again