多做题,通过考试没问题!

微软认证考试

睦霖题库>其他计算机考试>微软认证考试

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
答案解析:
进入题库查看解析

微信扫一扫手机做题