获取访问来源

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

 

posted @ 2013-06-23 23:21  microsoftzhcn  阅读(264)  评论(0编辑  收藏  举报