Issues in Tab I

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.