获取访问来源

var bdvGlobal = {};
		(function() {
			var ref = document.referrer;
			if ( ref ) {
				var match = ref.match(/^(http:\/\/|https:\/\/)([^?]+)/);
				if (match) {
					ref = match[2];
				}
				bdvGlobal.referer = ref;				
			}
		}());

 

你可能感兴趣的:(获取)