I have a form
<form name="loginForm" method="POST">
Username: <input type="text" name="username" value="" />
<br />
Password: <input type="password" name="password" value="" />
<input type="submit" name="submitButton" />
</form>
How do I take the information above after hitting the submit button, and do something with said data? Such as,
<script>
function checkLogin(){
//some code here
}
</scipt>
I really want to know how to use the SUBMIT button, and not just onClick.
Use the onSubmit event:
HTML:
Script: