-------------------------------JS-----bug---------------------------
document.onclick = function(){
function show(){
alert(this);//obj window
}
show();
alert(window.show);// js --- bug //undefined
};
------------
for(var i = 0; i < 10; i++){
}
alert("循环后的i:" + i); //输出是10
------------
"use strict";
document.onclick = function(){
function show(){
alert(this);
}
show();
alert(window.show);// js --- bug window 非严格模式
//undefined 严格模式
};
————————————————————————————--