-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsupport.html
55 lines (39 loc) · 1.26 KB
/
support.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
<!doctype html>
<html lang="en">
<head>
<title>Support Chat</title>
<!--Link to CSS -->
<link href="./css/sign.css" rel="stylesheet">
</head>
<body class="text-center">
<div class="center">
<h1 >Chat Supporter</h2>
<form class="form-signin" id="frm" >
<div class="content">
<input type="text" id="email" name="email" class="form-control" required> </input>
<span></span>
<label for="email">Email</label>
</div>
<button class="btn" value="submit" id="myButton" >Start Chat</button>
</form>
</div>
</body>
</html>
<script type="text/javascript">
document.getElementById("myButton").onclick = function () {
const regEx = /[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,8}(.[a-z{2,8}])?/g;
if(regEx.test(document.getElementById("email").value)){
document.getElementById("frm").action="chat.html";
}else{
alert("Invalid Email");
}
}
document.getElementById("frm").onsubmit = function () {
const regEx = /[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,8}(.[a-z{2,8}])?/g;
if(regEx.test(document.getElementById("email").value)){
document.getElementById("frm").action="chat.html";
}else{
alert("Invalid Email");
}
}
</script>