当前位置:Gxlcms > JavaScript > jquery延迟加载外部js实现代码_jquery

jquery延迟加载外部js实现代码_jquery

时间:2021-07-01 10:21:17 帮助过:11人阅读

代码如下:

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
$.getScript(gaJsHost + "google-analytics.com/ga.js",function(){
try {
var pageTracker = _gat._getTracker("UA-123456-16");
pageTracker._trackPageview();
} catch(err) {}
});

人气教程排行