I have action event click on a button in Javascript. If I click the button 2 times, the function handler of the action perform simultaneously or sequence? (the time between 2 click is faster than the function handler execution time).
问问题
101 次
1 回答
1
Your functions never run in parallel. When an event occurs, the user thread is awoken to execute the registered handler and only when your function finishes may the other function be called.
If you don't use webworkers, you never have two of your functions running at the same time in a page.
于 2013-04-01T10:05:53.633 回答