标签:com class blog code http div img java style javascript ext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript">
var a={
af:function(){
console.log(this);
},
b:{
bb:function(){
console.log(this);
}
},
c:{
cc:{
cccf:function(){
console.log(this);
}
}
}
}
a.b.bb();//这里this指向的时b
a.b.bb.call(Window);//this指向的是Window
a.b.bb.call(a);//this指向的时a
</script>
</head>
<body>
</body>
</html>
标签:com class blog code http div img java style javascript ext
原文地址:http://www.cnblogs.com/cart55free99/p/3695024.html