forked from Dn9x/Webkit-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get.html
63 lines (50 loc) · 1.14 KB
/
get.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
<!DOCTYPE html>
<html>
<head>
<title>Loading...</title>
<link rel="stylesheet" type="text/css" href="pub/css/style.css">
</head>
<body>
<div id='main'>
<div class="list3">
<img src="pub/images/loading.gif" />
</div>
</div>
<script src="pub/js/jquery-1.9.1.min.js"></script>
<script>
var name = getUrlPara("name");
var spider = require('./spider');
var async = require('async');
var url = "http://cnodejs.org/?page=1";
async.series([
function(next){
spider.getu(name, function(){});
next();
}, function(next){
spider.gett(url, function(){});
next();
}, function(next){
spider.getc(name, function(){
});
next();
}, function(next){
spider.getr(name, function(){
ch();
});
}], function(err, values) {
console.log('async end : ' + values);
});
function ch(){
window.location.href = "main.html?name="+name;
}
function getUrlPara(paraName)
{
var sUrl = location.href;
var sReg = "(?:\\?|&){1}"+paraName+"=([^&]*)"
var re=new RegExp(sReg,"gi");
re.exec(sUrl);
return RegExp.$1;
}
</script>
</body>
</html>