214-564-5316
Friday, July 25, 2008
•
Portfolio
•
FAQ's
•
Pricing
•
Request Info
•
Code Examples
•
Demos
•
Marketing
•
Tutorials
•
Downloads
•
Password Validation with Javascript Example and Code
Checkbox Validation with javascript
Your name:
Choose a password:
Verify password:
Here is the code:
<html> <head> <script> function validForm(passForm) { if (passForm.passwd1.value == "") { alert("you must enter a password"); passForm.passwd1.focus(); return false; } if (passForm.passwd1.value != passForm.passwd2.value) { alert("Entered passwords did not match"); passForm.passwd1.focus(); passForm.passwd1.select(); return false; } return true; } </script> <title>Password Validation</title> </head> <body bgcolor="#FFFFFF"> <form name="form" action="validation.asp" onsubmit="return validForm(this)"> Your name: <input type="text" name="textfield"> <BR> Choose a password: <input type="password" name="passwd1"> <BR> Verify password: <input type="password" name="passwd2"> <BR> <input type="submit" value="Submit" name="submit"> <input type="reset"> </body> </html>
•
Home
•
Contact Us
•
Terms of Service
•
Privacy Policy
•
Email Policy
•
Hosting
•
Links
•
Site Search
•