首页 > 代码库 > window.onload兼容问题

window.onload兼容问题

if ( window.addEventListener ) {    window.addEventListener("load", function(){sendPb(url);}, false);} else if ( window.attachEvent ) {    window.attachEvent( "onload", function(){sendPb(url);} );} else if ( window.onload ) {    window.onload = function(){sendPb(url);};}

  

window.onload兼容问题