-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·39 lines (37 loc) · 1010 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
<script>
$(function() {
$( "#keyword" ).autocomplete({
source: function( request, response ) {
$.ajax({
url: "http://searchapi.fashionguide.com.tw/keyword/get_word",
dataType: "jsonp",
data: {
q: request.term
},
success: function( data ) {
response( $.map( data, function( item ) {
return {
value: item.title
}
}));
}
});
},
minLength: 1,
});
});
</script>
</head>
<body>
<h2>Keyword autocomplet</h2>
<input type="text" id="keyword" name="q">
</body>
</html>