Question: 7.What does the following code do? var userName = $(user).firstChild.nodeValue; a. It puts the value of the userName variable into the HTML element with user
7.What does the following code do?
var userName = $("user").firstChild.nodeValue;
a. It puts the value of the userName variable into the HTML element with "user" as its id attribute
b.It replaces the text of an HTML element with "userName" as its id attribute with value "user"
c.It sets the text of an HTML element with "user" as its id attribute
d.It puts the text of an HTML element with "user" as its id attribute into the userName varieable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
