用ASP程序?qū)崿F(xiàn)“手推車”功能的技巧
作者: 來源: 發(fā)布時間:2011-6-7 15:19:43 點擊:
=-1)
DeleteCookie(ts); //如果ts含“mycat”則執(zhí)行清除
}
}
function getCookieVal (offset) { //取得項名稱為offset的cookie值
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) { //取得名稱為name的cookie值
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
DeleteCookie(ts); //如果ts含“mycat”則執(zhí)行清除
}
}
function getCookieVal (offset) { //取得項名稱為offset的cookie值
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) { //取得名稱為name的cookie值
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
上一篇:ASP制作彩色效驗碼的實例分享 下一篇: scripting.dictionary的研究分享
[收藏此文章]