摘要:
把你的大脑当做浏览器执行下面的代码两次,分别是IE6和IE9:
function testFunc(){
alert('test')
}
$(function(){
var g = document.getElementById ,
w = window.testFunc ;
//g
alert(typeof(g));
alert(String(g));
alert(g instanceof Object);
alert(g instanceof Function);
//w
alert(typeof(w));
alert(String(w));
alert(w instanceof Object);
alert(w instanceof Function);
//执行
alert(g('t'));
w();
}); 阅读全文