为什么我不能向窗口元素添加多个 onresize 实例?例如,只有第二个 onresize 事件(轮胎)会跟踪到日志:
var windowResize = {
fire : function(){ window.onresize = function(){ console.log('fire') }},
tire : function(){ window.onresize = function(){ console.log('tire') }}
}
windowResize.fire();
windowResize.tire();