-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest2.html
More file actions
106 lines (102 loc) · 2.59 KB
/
Copy pathtest2.html
File metadata and controls
106 lines (102 loc) · 2.59 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<style type="text/css">
.logo{
width: 50px;
height: 50px;
border: 1px solid red;
display: inline-block;
}
.userName{
width: 80px;
height: 30px;
display: inline-block;
bottom: 0px;
right: 0px;
position: absolute;
border: 1px solid red;
}
.clear{
zoom:1;
}
.clear:after{
clear: both;
content: .;
display: block;
visibility: hidden;
width: 1px;
height: 1px;
}
.content{
height: 300px;
margin-right: 202px;
border: 1px solid purple;
}
.aside{
width: 200px;
float: right;
border: 1px solid blue;
}
.header{
border: 1px solid green;
position: relative;
}
.footer{
border: 1px solid black;
text-align: center;
}
</style>
<body>
<div>
<header class="clear header">
<div class="logo">logo</div>
<div class="userName">用户名</div>
</header>
<div class="clear" >
<aside class="aside">aside-定宽200px</aside>
<div class="content">content</div>
</div>
<footer class="footer">footer</footer>
</div>
</body>
<script type="text/javascript">
var data = {a: 1, b: 2, c: 3, d: 4};
var obj = Object.keys(data).filter(function(x) { return data[x]>2});
console.log(obj);
function objF(name){
if(name){ this.name = name;}
return this;
}
objF.prototype.name="name2";
var a= objF("name1");
var b = new objF;
console.log(a);
console.log(b);
function getNthFibonacci(count) {
var ans=[1,1];
if(count < 2)
return ans[count];
else{
var i, k;
}
}
console.log(getNthFibonacci(6));
function showMoney( ) {
console.log(this.money);
};
var personA = new Object;
var personB = new Object;
personA.money= "100";
personB.money= "150";
personA.showMoney= showMoney;
personB.showMoney= showMoney;
personA.showMoney(); //"100"
personB.showMoney(); //"150"
var arr1 = ['a','b','c','d','e'];
var arr2 = arr1.splice(1,2,'newvalue');
console.log(arr2);
</script>
</html>