-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
43 lines (29 loc) · 742 Bytes
/
Copy pathmain.html
File metadata and controls
43 lines (29 loc) · 742 Bytes
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
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript" src="blah.js"></script>
</head>
<body>
<input id="sbox" />
<div id="results"></div>
<script>
var handler = function(event){
$("#results").text("");
var word = $("#sbox").val();
//console.log(word);
//console.log(phraseList);
console.log("=================================");
var foundWords = Search(
word,
phraseList,
.2);
//console.log(foundWords);
$.each(foundWords, function(i,x){
$("#results").append("<p><b>"+x.score+"("+x.winner+")</b>"+x.words+"</p>");
//console.log(x);
});
}
$("#sbox").on( "keyup", handler );
</script>
</body>
</html>