Skip to content

Instantly share code, notes, and snippets.

@zvineyard
Created July 2, 2012 21:48
Show Gist options
  • Save zvineyard/3035925 to your computer and use it in GitHub Desktop.
Save zvineyard/3035925 to your computer and use it in GitHub Desktop.
JavaScript: Disable Submit Button Upon Form Submission
<form name="form_name" action="" method="post" onsubmit="document.getElementById('btn_submit').disabled = 1;">
<input type="submit" name="btn_submit" value="Submit" class="btn" id="btn_submit" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment