forked from sbis04/sign_up_sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
114 lines (103 loc) · 3.45 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<link rel="stylesheet" type="text/css" href="page.css">
<title>Frontend Mentor | Intro component with sign up form</title>
<script type="text/javascript">
function showErrors() {
var fnError=document.getElementById("fname-error");
if(document.getElementById("fname").value.length==0)
{
fnError.innerHTML="First name can't be empty!";
fnError.style.color="red";
}
else
fnError.innerHTML="";
var lnError=document.getElementById("lname-error");
if(document.getElementById("lname").value.length==0)
{
lnError.innerHTML="Last name can't be empty!";
lnError.style.color="red";
}
else
lnError.innerHTML="";
var emailError=document.getElementById("email-error");
var mailformat = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if(document.getElementById("email").value.length==0)
{
emailError.innerHTML="Email can't be empty!";
emailError.style.color="red";
}
else if(!document.getElementById("email").value.match(mailformat))
{
emailError.innerHTML="Looks like this is not an email";
emailError.style.color="red";
}
else
emailError.innerHTML="";
var pwdError=document.getElementById("pwd-error");
if(document.getElementById("pwd").value.length==0)
{
pwdError.innerHTML="Password can't be empty!";
pwdError.style.color="red";
}
else
pwdError.innerHTML="";
}
</script>
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<!--
<style>
</style>
-->
</head>
<body>
<div>
<div class="split left-div">
<div class="centerd">
<br><br><br><br><br><br>
<p class="left-title"> Learn to code by watching others </p> <br> <br>
<p class="left-text"> See how experienced developers solve problems in real-time. Watching scripted tutorials is great, but understanding how developers think is invaluable. </p>
</div>
</div>
<div class="split right-div">
<div class="centerd">
<button class="try-it"> <b> Try it free 7 days </b> <p class="offer"> then $20/mo. thereafter </p> </button>
<form>
<div class="form-outline-block">
<div>
<input id="fname" type="text" name="first-name" placeholder="First Name">
<p id="fname-error">
</div>
<div>
<input id="lname" type="text" name="last-name" placeholder="Last Name">
<p id="lname-error">
</div>
<div>
<input id="email" type="text" name="email-address" placeholder="Email Address">
<p id="email-error">
</div>
<div>
<input id="pwd" type="password" name="password" placeholder="Password">
<p id="pwd-error">
</div>
<div>
<input type="button" id="submit" name="submit" value="CLAIM YOUR FREE TRIAL" onclick="showErrors();">
</button>
</div>
<center> <p class="form-bottom-text"> By clicking the button, you are agreeing to our <p class="terms"> Terms and Services </p>
</p></center>
</div>
</form>
</div>
</div>
</div>
<div class="footer">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="https://github.com/AzimPathan">Azim Pathan</a>
</div>
</body>
</html>