For (the let I=0; i
()
()
}, false);
}
Var iCount=2;
Var iCarouselid=window. SetInterval (" carousel () ", 2000);
The function carousel () {
Var sImgSrc='https://bbs.csdn.net/topics/images/b-ad' + iCount + 'JPG';
Var sAchange='a' + iCount;
/* records need to change back the link order of color, */
Var iA=iCount - 1;
{if (iA==0) iA=5; }
Var sArestore='a' + iA;
Document. The getElementById (" b - AD "). The SRC=https://bbs.csdn.net/topics/sImgSrc;
Document. The getElementById (sAchange). Style. BackgroundColor="an HSL (150, 40%, 30%)".
Document. The getElementById (sArestore). Style. BackgroundColor="an HSL (85, 55%, 50%)".
ICount=iCount + 1;
If (iCount==6) {iCount=1; }
}
The function changebgcolor (iNum) {
Document. The getElementById (" b - AD "). The SRC='https://bbs.csdn.net/topics/images/b-ad' + iNum + 'JPG';
For (var iC=1; IC & lt;=5; IC++) {
Var sA='a' + iC;
If (iC==iNum) {
Document. The getElementById (sA). Style. BackgroundColor="an HSL (150, 40%, 30%)".
} else {
Document. The getElementById (sA). Style. BackgroundColor="an HSL (85, 55%, 50%)".
}
}
}