<script type="Text/JavaScript"> function fonction() { ... on fait ici ce que l'on veut ... } <form ... onsubmit="fonction();" ... > ... </form>