Assignment 1: A Possible Answer



Gives you this:

<SCRIPT LANGUAGE="javascript">
      document.write("<FONT COLOR='RED'>This Is Red Text</FONT><BR>")
     document.write("<FONT COLOR='BLUE'>This Is Blue Text</FONT>")

     The effect was achieved by adding a second document.write line to the script and altering the HTML text inside the instance. I also added a <BR> command at the end of the first instance in order to get these on two different lines.

     You could have also gotten the same effect by making each document.write() command a document.writeln() command and dropping the <BR> altogether. Either way would have done just fine.


Did You Get It?


Back to the Index Page