
|
<SCRIPT> // \( tells us to escape the opening
parenthesis - this avoids the confusion var mySentence = prompt("Enter a sentence", "Let's see what happens!"); document.fgColor = myColor; document.write("<B>" + mySentence + "</B>"); </SCRIPT> NOTE: What we really wanted was just the sentence's color changed, not the entire document's foreground color. |