jiaqistart

This commit is contained in:
asd
2021-02-02 17:27:36 +08:00
parent 5d39890424
commit eca64f86c0
9 changed files with 472 additions and 0 deletions

50
js/demo/day4-1.html Normal file
View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
var cat = {
name: "大喵",
run: function () {
console.log("我会跑")
},
eat() {
console.log("我在吃东西")
}
};
var dog = {
name: "大汪",
bark() {
console.log("汪汪汪")
},
paqiang(m, n) {
console.log(this)
console.log(m, n, "我能爬墙")
}
}
// 大喵需要借用大汪的paqiang的技能
// dog.paqiang.call(cat,1,2)
dog.paqiang.apply(cat, [1, 2])
dog.paqiang()
function a(val) {
var name = val
c = 0
function b() { }
}
var str = 'Hello World'
a(1)
console.log(window.c)
</script>
</head>
<body>
</body>
</html>

0
js/demo/day4.html Normal file
View File