-
Notifications
You must be signed in to change notification settings - Fork 1
/
strongType.html
60 lines (58 loc) · 1.49 KB
/
strongType.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>
<head>
<title>StrongType</title>
<style type="text/css">
#email {
border-radius: 25px;
border: 2px solid black;
height: 35px;
width: 400px;
}
#email:focus {
border-color: green;
}
#btn {
border-radius: 25px;
background-color: cyan;
color: red;
font-weight: bold;
height: 35px;
width: 90px;
}
#btn:hover {
background-color: black;
}
#yo {
margin-top: 200px;
}
</style>
<script type="text/javascript">
function showUser(str) {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xmlhttp.open("GET","PHP/strongType.php?email="+str,true);
xmlhttp.send();
}
</script>
</head>
<body>
<div align="center" id="yo">
<form>
<input type="email" name="email" id="email" placeholder="enter email" onchange="showUser(this.value)" autofocus required><br><br>
<input type="submit" value="submit" id="btn">
</form>
</div>
<div id="txtHint"><b>Person info will be listed here...</b></div>
</body>
</html>