jquery延迟加载外部js实现代码如下:
var gajshost = (("https:" == document.location.protocol) ? "https://ssl." : "https://www.");
$.getscript(gajshost + "google-analytics.com/ga.js",function(){
try {
var pagetracker = _gat._gettracker("ua-123456-16");
pagetracker._trackpageview();
} catch(err) {}
});
如对本文有疑问, 点击进行留言回复!!
2016年信息安全工程师综合知识第11-15题解析【建群网培信息安全工程师】
网友评论