求助关于IF嵌套问题,请高手帮忙

来源:百度知道 编辑:UC知道 时间:2024/06/02 00:26:52
if Flag=1 then
if Product5<>"" then
response.write "<script>alert('超过可添加最大值!');</script>"
else if Product4<>"" then
left5=objrs3.fields("Quantity")
Product5=Product0
Price5=Quantity * UnitPrice
Quantity5=Quantity
else if Product3<>"" then
left4=objrs3.fields("Quantity")
Product4=Product0
Price4=Quantity * UnitPrice
Quantity4=Quantity
else if Product2<>"" then
left3=objrs3.fields("Quantity")
Product3=Product0
Price3=Quantity * UnitPrice
Quantity3=Quantity
else if Product1<>"" then
left2=objrs3.fields("Quantity")
Product2=Product0
Price2=Quantity * UnitPrice
Quantity2=Quantity
else left1=objrs3.fields("Quantity")
Pr

if Flag=1 then
if Product5<>"" then
response.write "<script>alert('超过可添加最大值!');</script>"
else
if Product4<>"" then
left5=objrs3.fields("Quantity")
Product5=Product0
Price5=Quantity * UnitPrice
Quantity5=Quantity
else
if Product3<>"" then
left4=objrs3.fields("Quantity")
Product4=Product0
Price4=Quantity * UnitPrice
Quantity4=Quantity
else
if Product2<>"" then
left3=objrs3.fields("Quantity")
Product3=Product0
Price3=Quantity * UnitPrice
Quantity3=Quantity
else
if Product1<>"" then
left2=objrs3.fields("Quantity")
Product2=Product0
P