-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreg-form.html
52 lines (39 loc) · 1.48 KB
/
reg-form.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Form Using JavaScript</title>
<link rel="stylesheet" href="css/reg-form.css">
</head>
<body>
<div class="container">
<form onsubmit="openPopup(); reset(); return false;">
<h3>REGISTER FOR INSURANCE </h3>
<input type="text id=name" placeholder="Your Name" required>
<input type="text id=text" placeholder="Date of Birth" required>
<input type="text id=phone" placeholder="Phone Number" required>
<input type="text id=gender" placeholder="Gender" required>
<textarea id="category" rows="4" placeholder="Applying for?"></textarea>
<button type="submit" class="btn" onclick="openPopup()" >Send</button>
</form>
</div>
<!-- adding popup message confirmation in form -->
<div class="popup" id="popup">
<img src="img/tick.png">
<h2>Thank You</h2>
<p>Your details has been successfully submitted. Thanks</p>
<a href="index.html">
<button type="button" onclick="closePopup()">OK</button>
</a>
</div>
<script>
let popup = document.getElementById("popup");
function openPopup(){
popup.classList.add("open-popup")
}
function closePopup(){
popup.classList.remove("open-popup")
}
</script>
</body>
</html>