Which of the following code creates a list item element by using thesetAttribute ()method to set the ID value of the list item to the text string "list1"?
A. var listElem = document.createElement("li");listElem.setAttribute("id","list1");
B. var listElem = document.createElement("list1");listElem.setAttribute("id");
C. var listElem = document.Element("li");listElem.setAttribute("list1");
D. var listElem = document.createElement("li");listElem.getAttribute("id",list1);
Answer: A
Computer Science & Information Technology
You might also like to view...
A(n) ________ only displays records that match selected criteria
Fill in the blank(s) with correct word
Computer Science & Information Technology
In an applet, events are handled:
A) with special applet event listeners B) differently, depending upon which computer is running the applet C) with event listeners, exactly as they are in GUI applications D) by always terminating the applet
Computer Science & Information Technology