Home > Back-end >  How to let intv1 execution after 4 times, intvt and intv1 stop? For we know
How to let intv1 execution after 4 times, intvt and intv1 stop? For we know

Time:10-03

Start. The onclick=function () {
Intv=setInterval (function () {
Q=Math. Floor (Math. The random () * s);;
Document. GetElementById (" num "). The innerHTML=h (q);
}, 300);
}
Intv1=setInterval (function () {
[q] o.p ush (h);
H.s plice (q), 1);
S=s - 1;
Intv=null;
Text="& lt; Ul> ";
For (I=0; I & lt; O.l ength; I++) {
The text +="& lt; Br>" [I] + o + "& lt;/br> ";
}
The text +="& lt;/ul> ";
Document. The getElementById (" ss "). The innerHTML=text;
Document. The getElementById (" s "). InnerHTML=o.l ength;
}, 3000);
}

CodePudding user response:

My idea is when the number of elements in the o variable reaches 4 full stop, but I tried a few times can't trouble you

CodePudding user response:

Junction post didn't reply
  • Related