用ASP程序实现“手推车”功能的技巧
作者: 来源: 发布时间:2011-6-7 15:19:43 点击:
=-1)
DeleteCookie(ts); //如果ts含“mycat”则执行清除
}
}
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”则执行清除
}
}
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;
Tags:
用ASP程序实现“手推车”功能的技巧上一篇:ASP制作彩色效验码的实例分享 下一篇: scripting.dictionary的研究分享
[收藏此文章]