Вопрос

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