防阻代码:
function loadScript(url, callback){
var script = document.createElement("script")
script.type = "text/javascript";
if (script.readyState) { //IE
script.onreadystatechange = function(){
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
};
}
else { //Others
script.onload = function(){
callback();
};
}
script.src = url;
document.getElementsByTagName("head")[0].appendChild(script);
}
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
_monitor_script_url=_bdhmProtocol+'hm.baidu.com/h.js?c0d6637b457066ce30e32f682f1b9036';
loadScript(_monitor_script_url, function(){
});