-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtool.html
224 lines (214 loc) · 7.3 KB
/
tool.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>百度/搜狗/好搜/必应下拉框关键词查询-盼盼工具</title>
<meta name="keywords" content="百度下拉框关键词查询,搜狗下拉框关键词查询,好搜下拉框关键词查询,必应下拉框关键词查询">
<link rel="stylesheet" href="http://static.ipanpan.com/base.min.css"/>
<style>
.main {
width: 100%;
margin: 0 auto;
background: #f0f0f0;
}
.content {
width: 100%;
max-width: 1280px;
margin: 0 auto;
background: #ffffff;
}
.header, .footer {
clear: both;
height: 50px;
background: #ffffff;
border: 1px solid #F0F0F0;
}
.search {
width: 100%;
max-width: 640px;
margin: 0 auto;
height: 160px;
}
.search input {
width: 70%;
height: 50px;
border-radius: 5px;
border: 1px solid #c9d8db;
box-sizing: border-box;
padding: 0 2%;
margin: 55px 0;
font-size: 14px;
float: left;
line-height: 50px;
}
.search span {
width: 22%;
height: 50px;
border-radius: 5px;
border: 1px solid #c9d8db;
margin: 55px 0 55px 4%;
font-size: 14px;
display: block;
text-align: center;
line-height: 50px;
box-sizing: border-box;
float: left;
cursor: pointer;
}
.search span:hover {
background: #c9d8db;
}
.site {
width: 100%;
margin: 0 auto;
padding: 30px 0;
border-bottom: 1px dotted #c9d8db;
}
.site p {
width: 100%;
margin: 0 auto;
max-width: 160px;
border-radius: 80px;
height: 160px;
border: 1px solid #c9d8db;
text-align: center;
line-height: 160px;
font-size: 24px;
}
.sug li {
width: 96%;
height: 50px;
line-height: 50px;
border-bottom: 1px dotted #c9d8db;
padding: 0 2%;
font-size: 16px;
}
.sug li a:hover {
color: #1aac53;
}
</style>
</head>
<body>
<div class="main">
<div class="header">
</div>
<div class="search">
<input type="text" placeholder="输入关键词搜索"/><span>搜索</span>
</div>
<div class="content">
<div class="view">
</div>
</div>
<div class="footer">
</div>
</div>
<script type="text/javascript" src="http://static.ipanpan.com/zepto.1.0.min.js"></script>
<script>
(function ($) {
$('body').on('keydown', function () {
if (event.keyCode == "13") {
search_data();
}
});
$('.search span').on('click', function () {
search_data();
});
})(Zepto);
function search_data() {
$('.view').empty();
var keyword = $('.search input').val();
if (keyword.length > 0) {
baidu_data(keyword);
sogou_data(keyword);
haosou_data(keyword);
bing_data(keyword);
} else {
alert('输入空值,请您重试!');
}
}
function baidu_data(keyword) {
window.baidu = {};
window.baidu.sug = function (data) {
// console.log(data.s);
var result = '<div class="site"><p>百度</p></div><div class="sug"><ul>';
$.each(data.s, function (k, v) {
result += '<li><a href="https://www.baidu.com/s?wd=' + v + '" target="_blank">' + v + '</a></li>';
});
result += '</ul></div>';
$('.view').append(result);
};
var url = 'http://suggestion.baidu.com/su?wd=' + keyword;
load_script(url, function () {
});
}
function sogou_data(keyword) {
window.sogou = {};
window.sogou.sug = function (data) {
// console.log(data[1]);
var result = '<div class="site"><p>搜狗</p></div><div class="sug"><ul>';
$.each(data[1], function (k, v) {
result += '<li><a href="http://www.sogou.com/web?query=' + v + '" target="_blank">' + v + '</a></li>';
});
result += '</ul></div>';
$('.view').append(result);
};
var url = 'http://w.sugg.sogou.com/sugg/ajaj_json.jsp?key=' + keyword + '&type=web&ori=yes&pr=web&abtestid=1&ipn=';
load_script(url, function () {
});
}
function haosou_data(keyword) {
window.suggest_so = function (data) {
// console.log(data.result);
var result = '<div class="site"><p>好搜</p></div><div class="sug"><ul>';
$.each(data.result, function (k, v) {
result += '<li><a href="http://www.haosou.com/s?q=' + v['word'] + '" target="_blank">' + v['word'] + '</a></li>';
});
result += '</ul></div>';
$('.view').append(result);
};
var url = 'http://sug.so.360.cn/suggest?callback=suggest_so&encodein=utf-8&encodeout=utf-8&format=json&fields=word,obdata&word=' + keyword;
load_script(url, function () {
});
}
function bing_data(keyword) {
window.bing = {};
window.bing.sug = function (data) {
// console.log(data.result);
var result = '<div class="site"><p>必应</p></div><div class="sug"><ul>';
$.each(data.result, function (k, v) {
result += '<li><a href="http://cn.bing.com/search?q=' + v + '" target="_blank">' + v + '</a></li>';
});
result += '</ul></div>';
$('.view').append(result);
};
var url = 'http://www.ipanpan.com/api/bing/sug/' + keyword;
load_script(url, function () {
});
}
function load_script(url, callback) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onload = script.onreadystatechange = function () {
if ((!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
callback && callback();
script.onload = script.onreadystatechange = null;
if (head && script.parentNode) {
head.removeChild(script);
}
}
};
head.insertBefore(script, head.firstChild);
}
console.info('{"author":"andy.jiang","date":"2015-05-23","email":"[email protected]"}');
</script>
<div style="display: none">
<script type="text/javascript">
var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cspan id='cnzz_stat_icon_1254623058'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s11.cnzz.com/stat.php%3Fid%3D1254623058' type='text/javascript'%3E%3C/script%3E"));
</script>
</div>
</body>
</html>