cookies格式问题。

zhuangjunx 2010-09-16 06:22:59
var data = Cookie.get("history"),
template = '<li><a href="#{url}" title="#{content}" target="_blank">#{content}</a></li>',
content = "";
if (data) {
var history_arg = data.split("_[YLMF]_");
history_arg.pop();
history_arg.forEach(function(element,index){

var a = element.split("+");
if(a!=="" && index<6){
content += format(template,{
url:a[0],
content:a[1]
})
}

});
$("#historyBox").el.innerHTML = content;
} else {
$("#historyBox").el.innerHTML = '<li class="none">对不起,您没有任何浏览记录</li>';
}

这样读取的数据,写入cookies的时候,应该是什么样的格式?
...全文
68 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhuangjunx 2010-09-17
  • 打赏
  • 举报
回复
var data = Cookie.get("history"),
template = '<li><a href="#{url}" title="#{content}" target="_blank">#{content}</a></li>',
content = "";
if (data) {
var history_arg = data.split("_[YLMF]_");
history_arg.pop();
history_arg.forEach(function(element,index){

var a = element.split("+");
if(a!=="" && index<6){
content += format(template,{
url:a[0],
content:a[1]
})
}

});
$("#historyBox").el.innerHTML = content;
} else {
$("#historyBox").el.innerHTML = '<li class="none">对不起,您没有任何浏览记录</li>';
}

这样读取的数据,写入cookies的时候,应该是什么样的格式?
zhuangjunx 2010-09-16
  • 打赏
  • 举报
回复
有人不?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧