UNPKG
myplayaaaaa
Version:
latest (1.0.0)
1.0.0
wwww
myplayaaaaa
/
ES5严格模式
/
函数内this指向.html
19 lines
(18 loc)
•
334 B
HTML
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE
html
>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"UTF-8"
>
<
title
>
Title
</
title
>
<
script
>
//普通模式函数内this指向window
"use strict"
;
//严格模式下函数内this指向undefined
function
test
(
){
alert
(
this
); }
test
();
</
script
>
</
head
>
<
body
>
</
body
>
</
html
>