JSP在线商城系统设计 第11页

JSP在线商城系统设计 第11页
 var diffMoney = newMoney - oldMoney;
   var newTotal = document.all.totalMoney.innerText*1+diffMoney;
   document.getElementById("money"+selid).innerText = Math.round(newMoney*100)/100;
   document.all.totalMoney.innerText = Math.round(newTotal*100)/100;
   alert("<bean:message key="cart.modi.suc"/>");
  }else{
   alert("<bean:message key="cart.modi.fail"/>");
  }
 }
 
 //删除选购记录
 function delCart(selid){
  var url = "cart.do?method=delCart&id="+selid;
  window.location = url;
 }
 
 //清空购物车
 function clearCart(){
  var url = "cart.do?method=clearCart";
  window.location = url;
 }
 
 //继续购物
 function continueBuy(){
  var url = "mer.do?method=searchMer&cateid=0";
  window.location = url;
 }

 //进入下一步
 function next(){
  var url = "cart.do?method=checkOrder";
  window.location = url;
 }  
</script>
<logic:messagesPresent property="addCartStatus">
 <script language="javascript">
  alert('<html:errors property="addCartStatus"/>');
 </script>
</logic:messagesPresent>
<logic:messagesPresent property="delCartStatus">
 <script language="javascript">
  alert('<html:errors property="delCartStatus"/>');
 </script>
</logic:messagesPresent>
www.751com.cn ">
  alert('<html:errors property="clearCartStatus"/>');
 </script>
</logic:messagesPresent>
</body>
</html>
Cart.java文件:
package com.ORM;

import java.util.*;
public class Cart implements java.io.Serializable {

 private Integer id;

 private Member member;

 private Double money;

 private Integer cartStatus;
 
 private Set merchandises = new HashSet();   //商品集合
 public Cart() {
 }
 public Cart(Member member) {
  this.member = member;
 }

 public Cart(Member member, Double money, Integer cartStatus) {
  this.member = member;
  this.money = money;
  this.cartStatus = cartStatus;
 }

 public void setMember(Member member) {
  this.member = member;
 }

 public void setMerchandises(Set merchandises) {
  this.merchandises = merchandises;

 << 上一页  [11] 

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有