Skip to content
Advertisement

How to use event and variables in the same function

JavaScript

I want to use preventDefault in the function, but I could not fix that.

JavaScript

In this line I send 'e' for the event. In the update function I’m using like this:

JavaScript

But its not working. How can I fix this problem. If you help me I will be glad.

Advertisement

Answer

you are sending the event as a string.

change this :

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement