April 2002
Beginner
413 pages
10h 46m
English
The user interface of your number-guessing game will consist of a simple text entry box, a Submit button, a Restart button, and plain text. The same SRF will be used throughout the user's session. This means that the same SRF will be used to play the game, display error messages, restart the game, and finally show the congratulations message when the user guesses the number correctly. To begin with, overwrite the current contents of your NumberGuess.srf file with the code from Listing 14.2.
1: {{ // This file implements the classic guess the number game }} 2: <html> 3: <script language="javascript"> 4: <!-- 5: function OnRestart() 6: { 7: location.href ... |
Read now
Unlock full access