ASP高手来 关于商最近浏览过的宝贝问题

来源:百度知道 编辑:UC知道 时间:2024/06/05 22:03:43
请问ASP商城里的最近浏览过的宝贝代码怎么写啊?比如淘宝里的最近浏览过的宝贝,有没有ASP会写的啊?
cookies 我也知道 有没有提示啊?

记下浏览过的商品ID,再读出来就是了.一般用"cookies",也可以用会员系统.

刚才给你写一个例,你保存下来运行看看..
<html>
<head>
<title>历史记录</title></head>
<body>
<% dim id,h_id,action
action = request.queryString("Act")
select case action
case "add"
id=request.cookies("id")
if id="" then
id=1
end if
response.cookies("id")=id+1
response.cookies("h_id")=id&"|"&request.cookies("h_id")
case "del"
response.cookies("id")=""
response.cookies("h_id")=""
end select %>
<input type="button" value="添加" onclick="location='?Act=add'" />
<input type="button" value="清除" onclick="location='?Act=del'" />
<%
h_id = request.cookies("h_id")
if instr(h