jquery.js

来自「强大的PHP内容管理系统尽量不要让站长把时间都花费在为您修正说明上。压缩包解压」· JavaScript 代码 · 共 50 行 · 第 1/2 页

JS
50
字号
					date = options.expires; 
				} 
				expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 
			} 
			var path = options.path ? '; path=' + options.path : ''; 
			var domain = options.domain ? '; domain=' + options.domain : ''; 
			var secure = options.secure ? '; secure' : ''; 
			document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 
		} else { // only name given, get cookie 
			var cookieValue = null; 
			if (document.cookie && document.cookie != '') { 
				var cookies = document.cookie.split(';'); 
				for (var i = 0; i < cookies.length; i++) { 
					var cookie = jQuery.trim(cookies[i]); 
					// Does this cookie string begin with the name we want? 
					if (cookie.substring(0, name.length + 1) == (name + '=')) { 
						cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 
						break; 
					} 
				} 
			} 
			return cookieValue; 
		} 
	};

⌨️ 快捷键说明

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