QUESTION NO: 1
A Web service returns a list of system users in the following format.
Name of first userfirst@contoso.com
Name of second usersecond@contoso.com
You need to populate a drop-down menu with the IDs and names of the users from the Web service, in the order provided by the service.
Which code segment should you use?
A. $.ajax(
$("").attr("value", id) .text(tx).appendTo("#dropdown"); ); );
B. $.ajax(
varid = $(this).id;
var tx = $(this).name.text;
$("").attr("value", id) .text(tx).appendTo("#dropdown"); ); );
C. $.ajax(
var id = $(this).attr("id");
var tx = $(this).find("name").text();
$("").attr("value", id) .text(tx).appendTo("#dropdown"); ); );
D. $.ajax(
var id = $(node).attr("id");
var tx = $(node).find("name").text();
$("").attr("value", id) .text(tx).appendTo("#dropdown"); ); );
Answer: C
Explanation:
QUESTION NO: 2
You create a Web page that contains the following div.
You have a JavaScript array named imageurls that contains a list of image URLs. You need to write a JavaScript function that will insert images from the URLs into target. Which code segment should you use?
A. $(imageurls).each(function(i,url)
$("", url).append("#target");
);
B. $(imageurls).each(function(i,url)
$("#target") += $("").attr("src", url);
);
C. $.each(imageurls, function(i,url)
$("").attr("src", url).appendTo("#target");
);
D. $.each(imageurls, function(i,url)
$("#target").append("").src = url;
);
Answer: C
Explanation:
QUESTION NO: 3
You create a Web page that contains the following image element.

You need to write a JavaScript function that will dynamically change which image is displayed. The function must be compatible across different browsers.
Which code segment should you use?
A. function changeImage()
myImage.src = "image2.png";
B. function changeImage()
document.getElementById("myImage").src =
"image2.png";
C. function changeImage()
getElementById("myImage").src =
"image2.png";
D. function changeImage()
window.getElementById("myImage").src =
"image2.png";
Answer: B
Explanation:
QUESTION NO: 4
You are developing an ASP.NET Web page. You add a data-bound GridView control. The GridView contains a TemplateField that includes a DropDownList. You set the GridViews ClientIDMode property to Static, and you set the ClientIDRowSuffix property to ProductID. You need to be able to reference individual DropDownList controls from client-side script by using the ProductID. What should you set the ClientIDMode property of the DropDownList to? MCITP Certification
A. AutoID
B. Static
C. Inherit
D. Predictable
Answer: D
Explanation:


