获取访问来源

var bdvGlobal = {};
		(function() {
			var ref = document.referrer;
			if ( ref ) {
				var match = ref.match(/^(http://|https://)([^?]+)/);
				if (match) {
					ref = match[2];
				}
				bdvGlobal.referer = ref;				
			}
		}());
原文地址:https://www.cnblogs.com/sntetwt/p/3151746.html