<inputtype='button'value='click me'id='btn' />
<script>
var num =0;
var obj = {
num:1,
fn:function(){
console.log(this.num);
},
init:function(){
setTimeout(this.fn,0);
document.getElementById('btn').addEventListener('click',this.fn, false);
}
};
obj.init();
</script>
输出结果为:0,undefined