Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3 (18 pts.). Screenshot l below is the initial rendering of prob3.html. If we cl

ID: 3575869 • Letter: 3

Question

3 (18 pts.). Screenshot l below is the initial rendering of prob3.html. If we click any item in the un-ordered list after heading Members (the second list), it is removed. Thus, Screenshot 2 shows the rendering after Jill (in the second list) has been clicked. If we click any item in the first list (after heading Candidates), it is moved to the end of the second list. Thus, Screenshot 3 shows the rendering after Sue and then Mary in the first list have been clicked. If an item is moved from the first list to the second, it then behaves like any other item in the second list, in particular, if it is clicked, it is removed. Thus, Screenshot 4 shows the rendering after Sue (in the second list) has been clicked. After the screenshots is the listing of prob3.html. Candidates Screenshot 1 Candidates Mary Mary Members Members Al Jill Srrepenehnt 4 Screenshot Candidates Candidates Ed Ed Members Members Al Mary Mary

Explanation / Answer

The del() function is as follows.

function del(elem)

{

elem.parentNode.removeChild(elem);

}

The mv() function is as follows.

function mv(elem)

{

var ul = document.getElementById("mems"); //getting reference of mems

var li = document.getCreateElement("li"); // creating new li

li.appendChild(elem); //adding value to li

ul.appendChild(li); //adding li to mems

del(elem); //Calling del() function

}