function setCookie(thecam,theName,theWord,theValue,theDay) { if ((theName != null) && (theValue != null)) { expDay = "Wed, 01 Jan 2020 18:56:35 GMT"; // 沒有?Ew的話就是2020年 if (theDay != null) { theDay = eval(theDay); // 就算是字?E爾雂]設定成數值 setDay = new Date(); setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24)); expDay = setDay.toGMTString(); } document.cookie = thecam +"="+ theName + "-"+theWord+"_"+escape(theValue)+";expires="+expDay; return true; } return 1; } function deleteCookie(theName) { document.cookie = theName + "=;expires=Thu,01-Jan-70 00:00:01 GMT"; return true; } function getCookie(theName) { theName += "="; // 新增=(等號)並省略搜尋 theCookie = document.cookie+";"; // 搜尋時最後一個項目要避免為-1 start = theCookie.indexOf(theName); // 搜尋所?Ew的名稱 if (start != -1) { end = theCookie.indexOf(";",start); return unescape(theCookie.substring(start+theName.length,end)); } return 1; }