문제

A website only shows some links after clicking on some buttons, but you can trigger these buttons using the js-console of Chrome.

Command:

expandPack('S151')

Basically, the only thing that changes to get the other links is the number (in the example 151)

So how can I use a for loop to get all links with the ids 1-300?

도움이 되었습니까?

해결책

A standard loop...

for (var i = 1; i <= 300; i++) {
    expandPack("S" + i);
}

다른 팁

Are you saying you want to do this:

for(var i = 1; i <= 300; i += 1) {
    expandPack('S' + i);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top