chongzhicheck.jsp

来自「用hibernate框架实现网上书店」· JSP 代码 · 共 35 行

JSP
35
字号
<%@ include file="common.jsp" %><%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><%@ page session="true" %><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title></title>    </head>    <body>        <%!           String use;           double money;        %>        <%         use=(String)session.getAttribute("uname");         money=Double.parseDouble(request.getParameter("money"));         if(money>0)             {            bookDB.chongzhi(use, money);                       out.println("<script>alert('充值成功!');" +                    "location.href='cashier.jsp'</script>");                          }         else {            out.println("<script>alert('充值金额不能为负数,充值失败!');" +                    "location.href='mylive.jsp'</script>");                                  }        %>                </body></html>

⌨️ 快捷键说明

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