Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing
Example 11.7:
Object Properties are Sometimes Strings
When you opened this document, JavaScript applied the lastIndexOf string method to the navigator.appVersion property (which is a string). This method checked to find out what type of browser you are using (either Windows, or UNIX or Mac), then tells the script which kind of line break to use when placing text into the textarea.
This is the script we used in the HEAD:
This is the textarea we created:
Previous Example-|-Next Chapters Examples-|-Return to Chapter Listing