Eyes Of Siche
Guest book

jquery cookie

<script type="text/javascript">
<!--
	// jquery Cookie
	(function($){
		$.cookie = function(key, value, options) {
			if(arguments.length > 1) {
				var o = $.extend({}, $.cookie.defaults, options);

				if (value === null || value === undefined) {
					value = '';
					o.expires = -1;
				}
				if (o.expires.constructor != Date && o.expires > 0) {
					var today = new Date();
					today.setDate(today.getDate() + o.expires);
					o.expires = today;
				}
				// Create the cookie string
				document.cookie = key + '=' + value + (o.expires != 0?'; expires=' + o.expires.toUTCString() : '') + (o.path? '; path=' + (o.path) : '') + (o.domain? '; domain=' + (o.domain) : '') + (o.secure? '; secure' : '');
			} else {
				if(result = new RegExp(key+"=(.*?)(?:;|$)").exec(document.cookie))
					return decodeURIComponent(result[1]);
					return false;
				}
		}; //' $.cookie = function(key, value, options)

		$.cookie.defaults = {
			expires: 365,
			path: '/'
		} // '$.cookie.defaults
	})(jQuery);
	// /jquery Cookie

	function cookieSave(num){
		$.cookie("cookieTest", num, {expires:0, path:'/', secure:0});
	}
	function check(){
		alert($.cookie("cookieTest"));
	}
//-->
</script>

참~~~~ 쉽죠잉~? -_-;;

Posted by siche

2011/06/13 10:11 2011/06/13 10:11
,
Response
No Trackback , 3 Comments
RSS
http://eos.pe.kr/rss/response/190

Trackback URL : http://eos.pe.kr/trackback/190

Comments List

  1. 이현수 2011/06/22 10:10 # M/D Reply Permalink

    span 테그가 ........왜 저기 들어가 있을까 ....?

    1. siche 2011/06/23 11:42 # M/D Permalink

      ?? 뭔소리야~?? @_@

    2. 이현수 2011/06/25 18:48 # M/D Permalink

      syntax ?? 소스 여러가지 색으로 표현해주는 플러그인..
      그거로드되면 이상하게 보여

Leave a comment
[로그인][오픈아이디란?]
« 1 2 3 4 5 6 7 8 ... 181 »
블로그 이미지

안돼는 것은 없다.. 항상 방법이 문제일 뿐이다.. 그 방법을 찾기 위해서는 노력할 뿐이다.. - siche

Archives

Recent Trackbacks

Calendar

«   2013/05   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Site Stats

Total hits:
815036
Today:
259
Yesterday:
419