试题详情
单项选择题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; });

  • C
  • 关注下方微信公众号,在线模考后查看

热门试题