<Form id="form_1"> <Input type="submit" value="OK" /> </Form> <Script> $("#form_1").submit(function(event) { // code.. }); </Script>