2013年5月19日

cookie and subcookie utilty in javascript

摘要: //cookie util 1 var CookieUtil = { 2 3 get: function (name) { 4 var cookieName = encodeURIComponent(name) + "=", 5 cookieStart = document.cookie.indexOf(cookieName), 6 cookieValue = null; 7 8 if (cookieStart > -1) { 9 ... 阅读全文

posted @ 2013-05-19 12:45 雷音 阅读(195) 评论(0) 推荐(0) 编辑

custom event and dragdrop solution in javascript

摘要: //custom event 1 function EventTarget() { 2 this.handlers = {}; 3 } 4 EventTarget.prototype = { 5 constructor: EventTarget, 6 addHandler: function (type, handler) { 7 if (typeof this.handlers[type] == "undefined") { 8 this.handlers[type] = ... 阅读全文

posted @ 2013-05-19 01:22 雷音 阅读(177) 评论(0) 推荐(0) 编辑

导航