JavaScript Assignment #3

Inserting Multiple Scripts

In this assignment, you will get familiar with inserting JavaScript into html code using <script> tags, and practice using document.write() - the most basic command in JavaScript.

  1. Create a basic page in html that contains three short sentences or paragraphs of text (a short poem or song lyrics work very nicely).
  2. You can see a few examples here of document.write() inserted using <script> tags.

  3. Choose one word in each sentence or paragraph and use JavaScript to display this word instead using document.write(). You will need 3 separate sets of <script> tags to do this.
  4. To help identify in the output which word has been changed, place the word inside of a set of italics or bold tags using basic html.

    If you are at a loss for words, check out the country music lyric generator at http://www.outofservice.com/country/.

Next assignment ... Assignment #4