-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
57 lines (56 loc) · 1.74 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>应用管家</title>
<link rel="stylesheet" href="css/index.css" />
<script src="js/hotcss.js" type="text/javascript" charset="utf-8"></script>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c9e3e7ffdcce5b383a052c55fb9400c7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div class="header">
<input name="q" value="" class="text-search" type="text" placeholder="搜索:Uber"/>
<input type="submit" class="search" value="" />
</div>
<div class="shadow"></div>
<div class="all">
</div>
</body>
<script type="text/javascript">
var url = window.location.href;
var m = url.indexOf('?');
var t = url.substr(m+1);
if(m>0){
$(".text-search").val(decodeURIComponent(t));
var urls="http://app.zookingsoft.com/api/search?key="+t;
ajxafun(urls,okfun);
}else{
urls="http://app.zookingsoft.com/api/index";
ajxafun(urls,okfun);
}
$(".search").click(function(){
var s;
s=$(".text-search").val();
setContent(s);
var urls="http://app.zookingsoft.com/api/search?key="+s;
ajxafun(urls,okfun);
});
function setContent(s){
s = s.replace(/<\/?[^>]*>/g,''); //去除HTML tag
s = s.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
s = s.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
return s;
}
</script>
</html>