In the tab, there is one of the most classic is the most difficult for beginners to understand the problem, that is, I problem, why I can not use the OnClick event inside, here to introduce the timing of JS implementation, in the JS for loop, only the first layer is can use I, in a layer of words inside I can not be used. Why, because JS in the For loop executes very quickly, in this tab, the for loop several times just to add a few clicks to the button, then the loop is over, when the Click event started, I was already the end of the loop i. But what if we want to use this cycle of I? For example, two methods can be used to solve this problem: 1 Customize an attribute and save I in advance. 2 "Closed space, I as the parameters of the argument to pass in, but it must be remembered, the function behind remember to receive this parameter.
Issues in Tab I