<script type="text/javascript"> function f() { alert('!'); return false; } </script> <form action="index.php?..." onsubmit="return f()" > <input type="submit" value="Вход" /> </form>