Previous Example-|-Next Example-|-Return to Chapter Listing
Example 7.5:
Returning Values--Broken Example
This is the same as the previous example, with the exception that we've removed the return sTypedText line from the function definition. Now the text from the Prompt box is not returned by the function. As you can see below, the text you typed is not inserted into the Web page:
You just typed: undefined
These are the scripts we used. First, in the HEAD:
Later in the Web page:
Previous Example-|-Next Example-|-Return to Chapter Listing