标签:style blog io ar color os sp on div
function $(fn){ if(document.addEventListener){ //W3C document.addEventListener(‘DOMContentLoaded‘,function(){ //注销事件,避免反复触发 document.removeEventListener(‘DOMContentLoaded‘,arguments.callee,false); fn(); },false); }else{ //IE6、7、8 (function(){ try{ document.documentElement.doScroll("left"); }catch(e){ return setTimeout(arguments.callee,5); } fn(); })(); } };
调用方法:
$(function(){ alert(0) })
标签:style blog io ar color os sp on div
原文地址:http://www.cnblogs.com/aiweidong/p/4162115.html