Hello everyone
there 2 way to disable the button to submit
1 using html attribute type= button
2 using js e.preventDefault();
but which is better if the 2 option available
thanks for help and have a nice day
Hello everyone
there 2 way to disable the button to submit
1 using html attribute type= button
2 using js e.preventDefault();
but which is better if the 2 option available
thanks for help and have a nice day
@justsomeone I’d say option 2, as it is more logical (sounds more obviously like it will work), and it allows your functionality to be unobtrusive — i.e. it controlled just in the JS layer, rather than requiring specific markup alterations.
thanks a lot @chrisdavidmills