web例子

来源:互联网 发布:mysql union all效率 编辑:程序博客网 时间:2024/06/10 19:38

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%>


<html>
 <head>
  <title>客户档案</title>
  <link rel="stylesheet" href="./css/main.css" type="text/css" />
  <script language="javascript" src="./script/main.js"></script>
   <script type="text/javascript">
 function change( url){
 document.forms[0].action=url;
    document.forms[0].submit();
 }
 </script>
 </head>

 <body>
  <p></p>
  <p><font style="font-size: 12pt;">档案管理 >客户档案</font></p>
     <html:form action="/client.do" >
  <p></p>
  <table border="0" cellpadding="1" cellspacing="1" width="95%">
   <tr>
    <td align="right" width="10%" nowrap="true">客户编号</td>
    <td width="20%">
    <html:text property="code" styleClass="TextInput"></html:text>
       </td>
    <td align="right" width="10%" nowrap="true">客户名称</td>
    <td width="20%">
    <html:text property="name" styleClass="TextInput"></html:text>
       </td> 
    <td align="right" width="15%">&nbsp;</td>
     <td width="20%">&nbsp;</td>      
       <td width="10%">&nbsp;</td>    
   </tr>
   <tr>
    <td align="right" width="10%" nowrap="true">&nbsp;</td>
     <td width="20%">&nbsp;</td>
       <td width="70%" colspan="5">&nbsp;</td>    
   </tr>   
  </table>
  
  <p></p>
  <div style="margin-left: 30px; margin-right: 0px">
   <table border="0" cellpadding="0" cellspacing="0"  width="95%">
    <tr>
       <td width="10%">
        <input type="submit" class="BtnAction" value="查找">                            
       </td>
       <td width="90%">&nbsp;</td>
     </tr>   
   </table>
  </div>
        <p></p>
  <div style="margin-left: 30px; margin-right: 0px">
   <table width="90%" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td align="right">
      <logic:greaterThan name="page" property="currentpage" value="1">
      <a href="javascript:change('./client.do?currentpage=1');">首页</a></logic:greaterThan>
      <logic:greaterThan name="page" property="currentpage" value="1">
      <a href="javascript:change('./client.do?currentpage=${page.prepage}');">前一页</a></logic:greaterThan>
      <a>共有<bean:write name="page" property="pagenumber"/>页</a>
      <a>第 <bean:write name="page"  property="currentpage"/>页</a>
       <logic:lessThan  name="page" property="currentpage" value="${page.pagenumber}">
      <a href="javascript:change('./client.do?currentpage=${page.nextpage}');">下一页</a></logic:lessThan>
         <logic:lessThan  name="page" property="currentpage" value="${page.pagenumber}">
      <a href="javascript:change('./client.do?currentpage=${page.lastpage}');">末页</a></logic:lessThan>
     </td>
    </tr>
   </table>
  </div>
 <div style="margin-left: 30px; margin-right: 0px">
   <table width="90%" border="1" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7%" class="td_title">选择</td>
          <td width="7%" class="td_title">修改</td>
          <td width="12%" class="td_title">客户编号</td>
          <td width="22%" class="td_title">客户名称</td>
          <td width="17%" class="td_title">客户地址</td>
        
          <td width="17%" class="td_title">客户电话</td>
          <td width="18%" class="td_title">客户Email</td>
        
        </tr>
        <logic:notEmpty name="list">
        <logic:iterate id="sublist" name="list">
        <tr>
          <td align="center" class="td_border"><input name="checkbox"  value="${sublist.code}" type="checkbox" title="选中后可进行删除或审核操作">
          </td>
          <td align="center" class="td_border"><a href="javascript:replaceModulUrl('./clientGet.do?code=${sublist.code }');"><img src="./image/edit.gif" border="0"></a> </td>
          <td class="td_border">${sublist.code }&nbsp;</td>
          <td class="td_border">${sublist.name }&nbsp;</td>
          <td class="td_border">${sublist.address }&nbsp;</td>
         
          <td class="td_border">${sublist.telephone }&nbsp;</td>
          <td class="td_border">${sublist.email }&nbsp;</td>
         
        </tr>
        </logic:iterate>
        </logic:notEmpty>
      </table>
 </div>

  <p></p>
  <div style="margin-left: 30px; margin-right: 0px">
   <table border="0" cellpadding="0" cellspacing="0"  width="95%">
    <tr>
       <td width="10%">
        <input type="button" class="BtnAction" value="新增" onClick="change('./clientaddUrl.do');">
       </td>    
       <td width="10%">
        <input type="button" class="BtnAction" value="删除" onClick="change('./clientDlete.do');">
       </td>
       <td width="10%">
        
       </td> 
       <td width="70%">&nbsp;</td>    
     </tr>
   </table>
  </div>
  </html:form>
 </body>
</html>