ProID=Request.Form("ProID")
Num=Request.Form("Num")
If Num"" And Cint(Num)>0 Then
arrayProductID=Split(Session("Product"),",")
arrayProductNum=Split(Session("Num"),",")
For i=0 To Ubound(arrayProductID)-1
If arrayProductID(i)=ProID Then
arrayProductNum(i)=Cint(arrayProductNum(i))+Num
IsNew=True
Exit For
End If
Next
If IsNew=True Then
Session("Product")=""
Session("Num")=""
For J=0 To Ubound(arrayProductID)-1
Session("Product")=Session("Product") & arrayProductID(J) & ","
Session("Num")=Session("Num") & arrayProductNum(J) & ","
Next
Else
Session("Product")=Session("Product") & ProID & ","
Session("Num")=Session("Num") & Num & ","
End If
Else
Response.Write "输入错误,操作失败!"
End If
%>