var ISDEBUG = true; function loadSource(src){ this.src = src; var srcs = this.src.split(","); loadSource.PRototype.loadJS = loadSource.prototype.loadjs = function() { var s = document.createElement('script'); s.src = this.src; if(ISDEBUG) s.src = s.src +"?"+new Date().getTime(); s.async = true; (document.body||document.head).appendChild(s); }; loadSource.prototype.loadCSS = loadSource.prototype.loadcss = function() { var c = document.createElement('link'); c.rel = 'stylesheet'; c.href = src; if(ISDEBUG) c.href = c.href +"?"+new Date().getTime(); document.head.appendChild(c); }; for(var i=0;i<srcs.length;i++){ this.src = srcs[i]; var type = src.split(".").pop(); if(this["load"+type]) this["load"+type](); } }
新闻热点
疑难解答