日期:2014-05-16  浏览次数:20354 次

用javascript设置iframe的onload事件的回调方法(兼容ie及firefox)
function eventPush(obj, event, handler) { 
	if (obj.addEventListener) { 
 		obj.addEventListener(event, handler, false); 
	} else if (obj.attachEvent) { 
		obj.attachEvent('on'+event, handler); 
	} 
} 
    
eventPush(document.getElementById('myForm:iframe1'),'load',myFunc);

?