-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (35 loc) · 1.43 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/style.css">
<title>Form validator</title>
</head>
<body>
<section class="section-center">
<!-- Form -->
<form id="myForm">
<div class="form-group">
<label for="name">نام:</label>
<input class="input-form" type="text" id="name" name="name" onchange="validateName()" required>
<div id="nameError" class="error-message"></div>
</div>
<div class="form-group">
<label for="email">ایمیل:</label>
<input class="input-form" type="email" id="email" name="email" onchange="validateEmail()" required>
<div id="emailError" class="error-message"></div>
</div>
<div class="form-group">
<label for="password">پسورد:</label>
<input class="input-form" type="password" id="password" name="password" onchange="validatePassword()" required>
<div id="passwordError" class="error-message"></div>
</div>
<input class="submit" type="submit" value="ارسال">
</form>
</section>
<!-- javascript -->
<script src="../js/script.js"></script>
</body>
</html>