-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContact.php
More file actions
65 lines (62 loc) · 1.79 KB
/
Contact.php
File metadata and controls
65 lines (62 loc) · 1.79 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Contact Form</title>
<link rel="stylesheet" type="text/css" href="Contact.css" />
</head>
<body>
<form action="#" method="POST" onSend="return validation();">
<div class="form">
<h3>Shkruani mesazhin tuaj</h3>
<div class="form-group">
<input
type="text"
class="form-control"
value=""
placeholder="Name"
id="contact-name"
/>
<label class="input-field-icon icon-user" for="login-name"></label>
</div>
<div class="form-group">
<input
type="email"
class="form-control"
value=""
placeholder="Email"
id="contact-email"
/>
<label class="input-field-icon icon-email" for="login-email"></label>
</div>
<div class="form-group">
<textarea
class="form-control"
value=""
placeholder="Message"
id="contact-message"
rows="1"
></textarea>
</div>
<button id="contact-send" class="btn btn-primary btn-lg btn-block">
Send
</button>
</div>
</form>
<script type="text/javascript">
function validation() {
var Name = document.getElementById("name").value;
var Email = document.getElementById("email").value;
if (name == "" || email == "") {
document.getElementById("form").innerHTML = "All field are Required";
return false;
} else if (Name.length < 4) {
document.getElementById("form").innerHTML =
"Name must be at least 4 characters";
return false;
} else {
return true;
}
}
</script>
</body>
</html>