How to JS prevent re-click on the element?

.style.cursor = "default"; why is not working

Here is the code

https://jsfiddle.net/3pv9h51s/

April 3rd 20 at 18:44
3 answers
April 3rd 20 at 18:46
Add the item that was already-click the class or attribute is clicked and then checks whether to perform an action of a click or not
April 3rd 20 at 18:48
He is not going to work. Because style.cursor determines what inconce must have the cursor over the element. The default is usually the standard arrow if the bar, loading, etc. (anyone notice the different States of the cursor)
And press again to disable, either via addEventListener 3M parameter to specify that the handler is disposable, either save the state in sessionStorage and see if it is already pressed, then trigger e.preventDefault()
April 3rd 20 at 18:50
The duplication of the theme: Link

Find more questions by tags JavaScript