moneyview.jsp

来自「这是我们做的一个网上购物系统,包手用户和管理员两大功能模块,采用jsp+serv」· JSP 代码 · 共 47 行

JSP
47
字号
<%@ page language="java" import="java.util.*" import="com.qyg.shop.user.*" import="java.sql.ResultSet" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'moneyView.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="css/common.css" type="text/css"></link>
  </head>
  
  <body bgcolor="D9EAFC">
  <p align=center>
    <%
    	User login = (User)session.getAttribute("loginUser");
    	if( login!=null ){
    		int id = login.getId();
    		UserDAO userDao = new UserManageDAO();
    		login = userDao.getUserById(login.getId());
    		
    		double money = login.getMoney();
    		out.println("<p align=center><font size=6>余额查询<br></font></p>");
    		out.println("<table align=center border class='datalist'><tr>");
    		out.println("<td width='150' height='50'>你当前的余额为:</td>");
    		out.print("<td width='250' height='50'><font color=ff0000 size=5>"+money+"元</font></td>");
    		out.print("</tr></table>");
    		
    	}else{
    		out.print("您还未登录,请先<a href='exit.jsp'>登录</a>");
    	}
     %>
  </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?