單項選擇題

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; });
微信掃碼免費搜題