I\'ve tried to create a loop with a for, and increment by an onclick event, but it doesn\'t work.
A part of js :
var gameCase = [\'\', \'\', \'\', \
Sorry if I did not understand your question properly, From the code I understand that, you are trying to add an onclick handler to all the list elements in found in the game tag (perhaps it should be a class / id).
The for loop will be executed when the script tag / file loads without any user interaction.
If you wish to assign a function that uses the current value of the counter. Use the following code:
itemLists[i].onclick = (function() {
return function() {
// TODO ---
// Your handler code here
}
})();