Question: As it is currently written, each call to the OldMacVerse function displays a new verse in the page division, overwriting any previous verse that may

As it is currently written, each call to the OldMacVerse function displays a new verse in the page division, overwriting any previous verse that may have been displayed. If we instead wanted each new verse to be appended to the previous verses, only a small change is necessary. In general, an assignment of the following form will append 'NEW TEXT' to the end of the contents of a page division with identifier DIV_ID.

document.getElementById('DIV_ID').innerHTML =

document.getElementById('DIV_ID').innerHTML + 'NEW TEXT';

The assignment works by taking the current value of the page division, appending 'NEW TEXT' to the end of that text, and then assigning the updated text back to the page division.

Modify the assignment in the OldMacVerse function in your oldmac.html page so that each verse is appended to the page division.

Step by Step Solution

3.65 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

1409-C-S-O-S(1027).docx

120 KBs Word File

Students Have Also Explored These Related Operating System Questions!