当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

YoucreateaWebpagethatcontainsthefollowingdiv.YouhaveaJavaScriptarraynamedimageurlsthatcont


YoucreateaWebpagethatcontainsthefollowingdiv.YouhaveaJavaScriptarraynamedimageurlsthatcontainsalistofimageURLs.YouneedtowriteaJavaScriptfunctionthatwillinsertimagesfromtheURLsintotarget.Whichcodesegmentshouldyouuse?()

A、$(imageurls).each(function(i,url){$("#$IMG0$#",url).append("#target");});

B、$(imageurls).each(function(i,url){$("#target")+=$("#$IMG0$#").attr("src",url);});

C、$.each(imageurls,function(i,url){$("#$IMG0$#").attr("src",url).appendTo("#target");});

D、$.each(imageurls,function(i,url){$("#target").append("#$IMG0$#").src=url;});

参考答案
您可能感兴趣的试题
  • YoucreateaWebpagethatcontainsthefollowing&

  • YoucreateaWebpagethatcontainsthefollowingcode.Youneedtoprovidethefollowingimplementation.E

  • YoucreateaWebpagethatcontainsthefollowingcode.Youneedtoensurethatwhentheuserclicksaniteminthelist thetextcolorofthe"Welcome!"messagewillchange.Whichdeclarationshouldyouuse?()