-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path222.html
More file actions
49 lines (49 loc) · 1.31 KB
/
222.html
File metadata and controls
49 lines (49 loc) · 1.31 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title></title>
<style type="text/css">
</style>
<script type="text/javascript">
/*function getQueryStringArgs() {
//var qs=(location.search.length>0?location.search.substring(1),''),
var qs='?tn=80035161_1_dg&num=852365'.substring(1),//去掉第0位到第一位的字符
args={},//用来保存数组(是JSON格式)
items=qs.length?qs.split('&'):[],//运用三元运算符来对qs操作。如果qs有数据。用&分割qs字符串。得到一个额items数组。
item=null,
name=null,
value=null,
i=0,
len=items.length;
alert(items);
for (var i = 0; i <len; i++) {
item=items[i].split('=');//用=分割items数组中的字符串
name=decodeURIComponent(item[0]);
value=decodeURIComponent(item[1]);
if(name.length){
args[name]=value;//用json格式保存分割得到的数据。
}
};
return args;
}
alert(getQueryStringArgs()["tn"])
alert(getQueryStringArgs()["num"]);
window.location.assign('https://www.baidu.com')*/
function hasPlugin(name){
name=name.toLowerCase();
for (var i = 0; i <navigator.plugins.length; i++) {
if(navigator.plugins[i].name.toLowerCase().indexOf(name)>-1){
return true;
}
};
return false;
}
(function(a,b){
alert(a+b);
})(3,2)
</script>
</head>
<body>
</body>
</html>