Line 268: | Line 268: | ||
console.log(oImg.src); | console.log(oImg.src); | ||
for(let i=0;i<arr.length;i++) | for(let i=0;i<arr.length;i++) | ||
− | { | + | { |
− | + | if(i==arr.length-1) | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
{ | { | ||
oImg.src=arr[0]; | oImg.src=arr[0]; | ||
+ | } | ||
+ | if(arr[i]==oImg.src) | ||
+ | { | ||
+ | oImg.src=arr[i+1]; | ||
} | } | ||
} | } |
Revision as of 08:04, 25 September 2019