-
Notifications
You must be signed in to change notification settings - Fork 0
/
99.php
35 lines (31 loc) · 908 Bytes
/
99.php
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
<html>
<head>
<script>
function showHint() {
var str=document.getElementById("txtMessage").value;
if (str.length == 0) {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xmlhttp.open("GET", "gethint.php?q=" + str, true);
xmlhttp.send();
}
}
</script>
</head>
<body>
<p><b>Start typing a name in the input field below:</b></p>
<form>
First name: <input type="text" id="txtMessage" >
<input type="submit" name="submit" class="m" value="CREATE">
</form>
<p>Suggestions: <span id="txtHint"></span></p>
<script type="text/javascript" src="js2.js"></script>
</body>
</html>