Re:HTML event handler attributes: down the rabbit hole
by idkwhoiam on Wednesday April 27, 2022 @05:37AM
(#31178035)
He could also use FormData [1] to collect values from the form
[1] - https://developer.mozilla.org/en-US/docs/Web/API/FormData/Fo...
Also. Onclick will simply execute the content as JavaScript. So if you’re not passing an argument, why would you expect an argument?
You can simply return false to prevent the defaults from happening.
The whole article has nothing to do with a rabbit hole. But more with a junior dev