PageSourceSearch

http://wode007.com/statics/js/autocomplete.js

js wode007.com collected 2026-10-08 05:00:12 UTC 1,448 bytes, 45 lines download raw bytes

1/*!
2 * Stui v1.1.0 Copyright 2016-2018 http://v.shoutu.cn
3 * Email [email protected],[email protected]
4 */
5 $(function(){
6	$('#wd').keyup(function(){
7		var keywords = $(this).val();
8		if (keywords=='') { $('#word').hide(); return };
9		$.ajax({
10			url: '/ass.php?wd=' + keywords,
11			dataType: 'jsonp',
12			jsonp: 'cb', //回调函数的参数名(键值)key
13			// jsonpCallback: 'fun', //回调函数名(值) value
14			beforeSend:function(){
15				$('#word').append('<div class="autocomplete-suggestion">正在加载。。。</div>');
16			},
17			success:function(data){
18				$('#word').empty().show();
19				if (data.s=='')
20				{
21					$('#word').append('<div class="autocomplete-suggestion">未找到与 "' + keywords + '"相关的结果</div>');
22				}
23				$.each(data.s, function(){
24					$('#word').append('<div class="autocomplete-suggestion">'+ this +'</div>');
25				})
26			},
27			error:function(){
28				$('#word').empty().show();
29				$('#word').append('<div class="autocomplete-suggestion">查找"' + keywords + '"失败</div>');
30			}
31		})
32	})
33	//点击搜索数据复制给搜索框
34	$(document).on('click','.autocomplete-suggestion',function(){
35		var word = $(this).text();
36		$('#wd').val(word);
37		$('#word').hide();
38		$('#submit').trigger('click');触发搜索事件
39	})		
40	//失去焦点时隐藏	
41	var clear = function(){ $('#word').hide();}
42	$("input").blur(function(){			    
43		 setTimeout(clear,500); 		
44	})
45})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.