作者: kent鹏  

转载请注明出处: http://www.cnblogs.com/xieyupeng/p/7159337.html

一、联系人添加

  1.添加页面设计

JAVAEE——SSH项目实战04:联系人添加、列表显示和修改

   JAVAEE——SSH项目实战04:联系人添加、列表显示和修改

   linkman/list.jsp:

<input type="button" value="选择客户" onclick="window.open('${pageContext.request.contextPath}/CustomerAction_list?select=true','','width=600,height=300')" />

   coustomer/list.jsp

    function selectCustomer(cust_id,cust_name){
        //获得添加页面的window对象
        var win = window.opener;
        //获得添加页面的document对象
        var doc = win.document;
        //获得隐藏域,和 文本框,并赋值
        doc.getElementById("cust_id").value=cust_id;
        doc.getElementById("cust_name").value=cust_name;
        //关闭当前窗口
        window.close();
        
    };
    <s:if test="#parameters.select==null">
        <a href="${pageContext.request.contextPath }/CustomerAction_toEdit?cust_id=<s:property value="#cust.cust_id" />">修改</a>
        &nbsp;&nbsp;
        <a href="${pageContext.request.contextPath }/customerServlet?method=delete&custId=${customer.cust_id}">删除</a>
    </s:if>
    <s:else>
        <input type="button" value="选择" onclick="selectCustomer(<s:property value="#cust.cust_id" />,'<s:property value="#cust.cust_name" />')" />
    </s:else>

  2.添加客户

    JAVAEE——SSH项目实战04:联系人添加、列表显示和修改

 

二、联系人列表

  按照客户列表完成(抄)

 

三、联系人修改

   JAVAEE——SSH项目实战04:联系人添加、列表显示和修改

注:后台使用同一个方法完成添加和更新功能

 

相关文章:

  • 2021-07-27
  • 2022-01-29
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2022-01-02
猜你喜欢
  • 2021-07-30
  • 2022-12-23
  • 2021-07-28
  • 2021-10-23
  • 2021-12-05
  • 2022-12-23
相关资源
相似解决方案