+ 2
What is prevent default()
prevent default()
2 Antworten
+ 4
Well I don't understand why someone dislike your question anyway
First of all what does prevent mean? Yes It mean "block"
so preventDefault() prevent from doing as its default
And this function is method of event object
(Look at line 11 straightly)
Such as this code
By default you can press the key on input area
but preventDefault will prevent you from press any keys on that input area
https://code.sololearn.com/WyiIXCPMA7QM/?ref=app
+ 2
thanks for your awnser