Previous Example-|-Next Example-|-Return to Chapter Listing
Example 13.4:
Creating an Object Prototype
[This example works with Netscape Navigator 3. It will not work properly with Internet Explorer 3.]
We've created a property (color) and a method (colored()) for String objects. Then we've used these to modify the way in which text is written to the page.
We have this script in the HEAD:
Then this script in the BODY:
Previous Example-|-Next Example-|-Return to Chapter Listing