⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show.jsp

📁 java web开发宝典源代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.yxq.bean.UserInfo" %>
<% 
   List userlist=(ArrayList)request.getAttribute("userlist"); 
   String pageinfo=(String)request.getAttribute("pageinfo");
   String pagelink=(String)request.getAttribute("pagelink");
   if(pageinfo==null)pageinfo="";
   if(pagelink==null)pagelink="";
   String from=request.getParameter("from");
%>
<html>
  <head>
    <title>显示记录</title>
    <style type="text/css">
       th{font-size:9pt}
    </style>
  </head>
  <body>
    <center>
      <table border="0" cellspacing="0" width="530" style="margin-top:-25">
          <tr height="55" valign="bottom">
             <th width="70" align="center">用户名</th>
             <th width="100" align="left">真实姓名</th>
             <th width="70" align="left">密码</th>
             <th width="80" align="left">电话号码</th>
             <th width="130" align="right">E-mail</th>
             <th width="80" colspan="2">操作</th>
          </tr>
          <tr><td colspan="7"><hr width="525" size="1" style="margin-top:-3"></td></tr>
<% if(userlist==null||userlist.size()==0){ %>
          <tr><td colspan="7" align="center">没有记录显示!</td></tr>
<% }else{
         for(int i=0;i<userlist.size();i++){
             UserInfo single=(UserInfo)userlist.get(i);
             int id=single.getId();
             String name=single.getUserId();
             String truename=single.getUserName();
             String password=single.getUserPwd();
             String email=single.getUserEmail();
             String phone=single.getUserPhone();
             String bgcolor="";
             if((i+2)%2!=0)
                  bgcolor="";
             else
                  bgcolor="#f9f2e0";
%>
          <tr height="25" bgcolor="<%=bgcolor%>">
              <td align="center"><%=name%></td>
              <td><%=truename%></td>
              <td><%=password%></td>
              <td><%=phone%></td>
              <td align="right"><%=email%></td>
              <td width="40" align="right"><a href="admin/subMenu/client?op=modify&type=lookup&id=<%=id%>">修改</a></td>
              <td width="40" align="center"><a href="admin/subMenu/client?op=delete&&from=<%=from%>&id=<%=id%>">删除</a></td>
          </tr>                     
<% 
         }//for
   } 
%>
          <tr>
              <td align="center" colspan="7" height="50">
                  <table width="500">
                       <tr>
                           <td align="left"><%=pageinfo%></td>
                           <td align="right"><%=pagelink%></td>                                         
                       </tr>
                  </table>
              </td>
          </tr>
      </table>
    </center>
  </body>
</html>

⌨️ 快捷键说明

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