摩洛客中文论坛,叶象花,青春期2演员表
//普通函数 // function f1() { // console.log(this); // } // f1();
//定时器中的this // setinterval(function () { // console.log(this); // },1000);
//构造函数 // function person() { // console.log(this); //对象的方法 // this.sayhi=function () { // console.log(this); // }; // } //原型中的方法 // person.prototype.eat=function () { // console.log(this); // }; // var per=new person(); // console.log(per); // per.sayhi(); // per.eat();
//严格模式: "use strict";//严格模式 function f1() { console.log(this);//window } f1();
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
css3 flex布局 justify-content:space-between 最后一行左对齐
网友评论