首页 > 其他 > 详细

设置cookie,判断用户是否为新用户

时间:2017-02-16 16:48:52      阅读:222      评论:0      收藏:0      [点我收藏+]
function get_cookie(Name) {
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		if (offset != -1) {
			// if cookie exists
			offset += search.length
				// set index of beginning of value
			end = document.cookie.indexOf(";", offset);
			// set index of end of cookie value
			if (end == -1)
				end = document.cookie.length;
			returnvalue = unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}

  

设置cookie,判断用户是否为新用户

原文:http://www.cnblogs.com/kymming/p/6406410.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!