📄 emptycart.jsp
字号:
<%@ page language="java" contentType="text/html;charset=GB2312"%>
<%! //处理字符串的常用方法
public String getString(String s) {
if(s == null) s = "";
try{
byte a[] = s.getBytes("ISO-8859-1");
s = new String(a);
}
catch(Exception e) { }
return s;
}
String n=null;
%>
<%
/*清空Cookie(购物车)信息*/
Cookie[] cookies=request.getCookies();
for (int i=0;i<cookies.length-1;i++)
{
String id=cookies[i].getName();
Cookie c=new Cookie(id,"0");
c.setMaxAge(0);
response.addCookie(c);
}
%>
<!--jsp:forward page="cart.jsp" /-->
<%
String userid= (String)session.getAttribute("userid");
userid=getString(userid);
session.setAttribute("userid",userid);
%>
<html>
<head>
<meta http-equiv="refresh" content="0;URL=cart.jsp">
<style type="text/css">
<!--
.style1 {
font-size: 14;
color: #660000;
}
-->
</style>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -