> JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing
Sure! Always trust the client :)
> JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing
Sure! Always trust the client :)
I'm in no way advocating client-side-only validation, but form validation on the client side to clean up mistakes can save a server round trip and a page reload, and so could save server side processing.
EDIT: just to clarify, I don't mean to turn this into a discussion with further nitpicking. I just thought your quote and comment were representative of some of the W3Fools content; picking a quote and interpreting it to mean what you want it to mean, and then criticizing it on that basis.
But w3schools is read by beginners, they don't have any clue about web security whatsoever, if you don't tell them everything they will just go with the few things that you've told them.