|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <title>jQuery Validation - Example</title> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> |
| 8 | + <style> |
| 9 | + .error{ |
| 10 | + color: red; |
| 11 | + font-style: italic; |
| 12 | + } |
| 13 | + </style> |
| 14 | +</head> |
| 15 | +<body> |
| 16 | + <div class = "container"> |
| 17 | + <div class = "col-md-6 col-md-offset-3"> |
| 18 | + <div class = "panel panel-primary"> |
| 19 | + <div class = "panel-heading"> |
| 20 | + Registration |
| 21 | + </div> |
| 22 | + <div class = "panel-body"> |
| 23 | + <form id = "registration"> |
| 24 | + <input type = "text" class = "form-control" name = "username" placeholder = "Username"/> |
| 25 | + <br/> |
| 26 | + <input type = "text" class = "form-control" name = "email" placeholder = "Email"/> |
| 27 | + <br/> |
| 28 | + <input type = "password" class = "form-control" name = "password" placeholder = "Password" id = "password"/> |
| 29 | + <br/> |
| 30 | + <input type = "password" class = "form-control" name = "confirm" placeholder = "Confirm Password"/> |
| 31 | + <br/> |
| 32 | + <input type = "text" class = "form-control" name = "fname" placeholder = "First Name"/> |
| 33 | + <br/> |
| 34 | + <input type = "text" class = "form-control" name = "lname" placeholder = "Last Name"/> |
| 35 | + <br/> |
| 36 | + <div class = "gender"> |
| 37 | + <label class="radio-inline"><input type="radio" name="gender" class = "form-contorl"/>Male</label> |
| 38 | + <label class="radio-inline"><input type="radio" name="gender" class = "form-contorl"/>Female</label> |
| 39 | + </div> |
| 40 | + <br/> |
| 41 | + |
| 42 | + <div class = "hobbies"> |
| 43 | + <label class="checkbox-inline"><input type="checkbox" name = "hobbies">Cricket</label> |
| 44 | + <label class="checkbox-inline"><input type="checkbox" name = "hobbies">Football</label> |
| 45 | + <label class="checkbox-inline"><input type="checkbox" name = "hobbies">Hockey</label> |
| 46 | + <label class="checkbox-inline"><input type="checkbox" name = "hobbies">Tennis</label> |
| 47 | + </div> |
| 48 | + <br/> |
| 49 | + <select class = "form-control" name = "country"> |
| 50 | + <option value="0" selected="" disabled="">--SELECT--</option> |
| 51 | + <option>India</option> |
| 52 | + <option>Australia</option> |
| 53 | + <option>Japan</option> |
| 54 | + <option>China</option> |
| 55 | + <option>South Africa</option> |
| 56 | + </select> |
| 57 | + <br/> |
| 58 | + <textarea class = "form-control" name = "address" placeholder="Address"></textarea> |
| 59 | + <br/> |
| 60 | + <button type = "submit" class = "btn btn-primary">Submit</button> |
| 61 | + </form> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> |
| 67 | + <script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.17.0/dist/jquery.validate.js"></script> |
| 68 | + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
| 69 | + <script src="register.js"></script> |
| 70 | +</body> |
| 71 | +</html> |
0 commit comments