How to use Ajax in any form submission?

Example