Edit in JSFiddle

<form 
  id="login-form" 
  onsubmit="alert('onsubmit'); return false;">
  username: <input type="text" name="username">
</form>