运行代码
(Shift+Enter)
HTML教程
奔月教程(runoon.com)
JavaScript
this
关键字
函数中,默认情况下,
this
指向全局对象。
严格模式下,
this
为
undefined
,因为严格模式下不允许默认绑定:
运行结果