-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest.html
65 lines (51 loc) · 1.03 KB
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="jQuery.js"></script>
<div id="idone">
<ul id="ulone">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
<button class="btn1"></button>
</div>
<script>
// $(document).ready(function(){
// $(".btn1").click(function(){
//
// });
// });
// window.onload=function () {
// // console.log(Array.prototype.slice.call('123'));//["1", "2", "3"]
//
//
//
// }
console.log([].push("<p>test1</p><div>test2</div>"));
let arr=[]
arr[10]=11
console.log(arr.length); //11
arr[-1]=-1
console.log(arr.length) //11
arr[3.14]=3.14
console.log(arr.length) //11
//===================================
let arr1=[]
arr1[2.1]=2.1
console.log(arr1[2.1],'arr144') //2.1
console.log(arr1.length,'arr145') //0
arr1[1]=1
console.log(arr1.length,'arr147') //2
//========================
let arr2=[]
arr2[-1]=-1
console.log(arr2.length,'arr253') //0
</script>
</body>
</html>