How to implement a lock in JavaScript

前端 未结 8 944
青春惊慌失措
青春惊慌失措 2020-12-04 07:49

How could something equivalent to lock in C# be implemented in JavaScript?

So, to explain what I\'m thinking a simple use case is:

User clicks

8条回答
  •  死守一世寂寞
    2020-12-04 08:22

    Why don't you disable the button and enable it after you finish the event?

    
    
    
    

    Happy coding !!!

提交回复
热议问题