-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (58 loc) · 2.13 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Document</title>
</head>
<body>
<div class="container">
<div style="text-align:center">
<h2>Contact Us</h2>
<p>Swing by for a cup of coffee, or leave us a message:</p>
</div>
<div class="row">
<div class="column">
<form id="submit-form" action="">
<label for="fname">First Name</label>
<input type="text" id="fname" name="name" placeholder="Your name..">
<label for="lname">Email</label>
<input type="text" id="lname" name="email" placeholder="Your last name..">
<label for="country">Country</label>
<select id="country" name="color">
<option value="australia">Australia</option>
<option value="canada">Canada</option>
<option value="usa">USA</option>
</select>
<label for="subject">Subject</label>
<textarea id="subject" name="message" placeholder="Write something.." style="height:170px"></textarea>
<input type="submit" value="Submit">
</form>
</div>
<div class="column">
<img src="crossroads.png" style="width:100%">
</div>
</div>
</div>
<script>
$("#submit-form").submit((e)=>{
e.preventDefault()
$.ajax({
url:"",
data:$("#submit-form").serialize(),
method:"post",
success:function (response){
alert("Form submitted successfully")
window.location.reload()
//window.location.href="https://google.com"
},
error:function (err){
alert("Something Error")
}
})
})
</script>
</body>
</html>