最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
这个是我以前用去年用ASP写的一个购物车主体,已经功过测试,运行良好,希望能给ASP的爱好者带来益处
时间:2022-07-02 23:22:15 编辑:袖梨 来源:一聚教程网
<%@ Language=VBScript %>
<%Response.Expires=0%>
<%
'写入COOKIE
'Response.Write Request.Cookies("warebuycount")
sub setcookie(Aname,warenum,warename,price,warecount,pricelow)
Response.Cookies(Aname).domain=application("wareurl") 'wareurl代表域名
Response.Cookies(Aname).expires=date()+30 'COOKIE过期日期
Response.Cookies(Aname).path="/"
Response.Cookies(Aname).Secure = FALSE
Response.Cookies(Aname)("warenum")=warenum '商品编号
Response.Cookies(Aname)("warename")=warename '商品名称
Response.Cookies(Aname)("price")=price '价格
Response.Cookies(Aname)("warecount")=warecount '购买的数量
Response.Cookies(Aname)("pricelow")=pricelow '会员价格
end sub
sub setcount(warebuycount) '用于计算客户购买的商品种类
Response.Cookies("warebuycount").domain=application("wareurl")
Response.Cookies("warebuycount").expires=date()+30
Response.Cookies("warebuycount").path="/"
Response.Cookies("warebuycount").secure=false
Response.Cookies("warebuycount")=warebuycount
end sub
'写入COOKIES
sub setcookies(warenum,warename,price,warecount,pricelow,warebuycount)
setcookie "warenum"+Cstr(warebuycount),warenum,warename,price,warecount,pricelow
end sub
sub delcookies(delwarenum)
warebuycount=Request("warebuycount")-1
while Cint(delwarenum)<=Cint(warebuycount)
setcookies Request.Cookies("warenum"+Cstr(delwarenum+1))("warenum"),Request.Cookies("warenum"+Cstr(delwarenum+1))("warename"),Request.Cookies("warenum"+Cstr(delwarenum+1))("price"),Request.Cookies("warenum"+Cstr(delwarenum+1))("warecount"),Request.Cookies("warenum"+Cstr(delwarenum+1))("pricelow"),delwarenum
<%Response.Expires=0%>
<%
'写入COOKIE
'Response.Write Request.Cookies("warebuycount")
sub setcookie(Aname,warenum,warename,price,warecount,pricelow)
Response.Cookies(Aname).domain=application("wareurl") 'wareurl代表域名
Response.Cookies(Aname).expires=date()+30 'COOKIE过期日期
Response.Cookies(Aname).path="/"
Response.Cookies(Aname).Secure = FALSE
Response.Cookies(Aname)("warenum")=warenum '商品编号
Response.Cookies(Aname)("warename")=warename '商品名称
Response.Cookies(Aname)("price")=price '价格
Response.Cookies(Aname)("warecount")=warecount '购买的数量
Response.Cookies(Aname)("pricelow")=pricelow '会员价格
end sub
sub setcount(warebuycount) '用于计算客户购买的商品种类
Response.Cookies("warebuycount").domain=application("wareurl")
Response.Cookies("warebuycount").expires=date()+30
Response.Cookies("warebuycount").path="/"
Response.Cookies("warebuycount").secure=false
Response.Cookies("warebuycount")=warebuycount
end sub
'写入COOKIES
sub setcookies(warenum,warename,price,warecount,pricelow,warebuycount)
setcookie "warenum"+Cstr(warebuycount),warenum,warename,price,warecount,pricelow
end sub
sub delcookies(delwarenum)
warebuycount=Request("warebuycount")-1
while Cint(delwarenum)<=Cint(warebuycount)
setcookies Request.Cookies("warenum"+Cstr(delwarenum+1))("warenum"),Request.Cookies("warenum"+Cstr(delwarenum+1))("warename"),Request.Cookies("warenum"+Cstr(delwarenum+1))("price"),Request.Cookies("warenum"+Cstr(delwarenum+1))("warecount"),Request.Cookies("warenum"+Cstr(delwarenum+1))("pricelow"),delwarenum
相关文章
- 王者荣耀侦探能力大测试攻略 王者荣耀侦探能力大测试怎么过 11-22
- 无期迷途主线前瞻兑换码是什么 11-22
- 原神欧洛伦怎么培养 11-22
- 炉石传说网易云音乐联动怎么玩 11-22
- 永劫无间手游确幸转盘怎么样 11-22
- 无期迷途主线前瞻兑换码是什么 无期迷途主线前瞻直播兑换码介绍 11-22