function father(name, age) {
this.name = name
this.age = age
}
function child(name, age, height) {
// father.apply(this,arguments)
father.call(this, name, age)
this.height = height
return "name:" + this.name + " age:" + this.age + " height:" + this.height
}
obj.hellow = function(){
console.log(this)
return 'hellow boy'
}
function hellow(){
console.log(this)
return 'hellow boy1'
}
btn1.onclick = function () {
console.log(hellow.bind(this))
}
image.png
image.png
image.png
image.png
image.png
网友评论