I recently found out that you can use event handlers in external .js files, making you able to keep your JavaScript completely separate of your HTML.

How would you validate an HTML form this way?