This is the content of my paragraph.

3. Using the DOM properties and methods, and using the markup in Exercise 1, create a JavaScript function that will be called when the document is loaded. The function should be set up as follows:

  1. a. Create an element node p assigned to a variable called para.
  2. b. Create a text node assigned to a variable called txt1.
  3. c. Append txt1 to para.
  4. d. Create an element node em assigned to a variable called emphasis emObj.
  5. e. Create a text node assigned to a variable called txt2.
  6. f. Append txt2 to emphasis emObj.
  7. g. Append emphasis to para.
  8. h. Create a text node assigned to a variable called txt3.
  9. i. Append txt3 to para.
  10. j. Append para to the element testdiv in the document.

Start with an HTML document containing > tags with an id attribute called testdiv. Complete chapter 15 exercise 3. Save this page as chapt15ex3.html in your week 12 folder.

Back to Assignment Web Page.

Valid XHTML 1.0!

Valid CSS!

W3C XHTML validation page

W3C CSS Validation Page