pv.js

来自「ieee1394驱动程序」· JavaScript 代码 · 共 36 行

JS
36
字号
if(typeof(pvhitimgview)=="undefined"){
	var pvhitimgview=true;
	function pv_rport(dm,f) {
	  var i = dm.indexOf(f);
	  if (i > 0) {
	    return  dm.substring(0, i);
	  }
	  return dm;
	}
	
	function pv_d(){
		var now = new Date().getTime();
	  	var datestr=escape(now*1000+Math.round(Math.random()*1000));
	  	var imgsrc='';
		
		if(top.location==self.location){
			imgsrc='http://pv.zol.com.cn/images/pvhit0001.gif?t='+datestr+'&'+document.referrer;
		}else {
			var d=document.referrer+'';
			d=d.substr(7);
			d=pv_rport(d,'/');
			d=pv_rport(d,':');
			
			if(d.substr(d.length-10)=='zol.com.cn' || d.substr(d.length-10)=='google.com' || d.substr(d.length-9)=='baidu.com'|| d.substr(d.length-8)=='3721.com' || d.substr(d.length-8)=='1sou.com' || d.substr(d.length-8)=='pku.edu.cn')
				imgsrc='http://pv.zol.com.cn/images/pvhit0002.gif?t='+datestr+'&'+document.referrer;
			else imgsrc='';
			
			//imgsrc='http://pv.zol.com.cn/images/pvhit0002.gif?t='+datestr+'&'+document.referrer;
		}
		
		if(imgsrc!='') document.write('<img border=0 width=1 height=1 src="'+imgsrc+'">');
	}
	
	pv_d();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?