Pergunta

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?

Foi útil?

Solução

A standard loop...

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

Outras dicas

Are you saying you want to do this:

for(var i = 1; i <= 300; i += 1) {
    expandPack('S' + i);
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top