asp网络编程事例书中的例子 我打进去出问题了
关于购物系统的 shoppingC.asp出问题了 A B D E 都可以
出错为
错 误 码:0x800A03ED
错误代码:for I=0 to UBound(Items)
错误描述:缺少 '( '
C出错部分代码如下
<%
Response.buffer=true
Basket= " "
Items=Split(Request( "ItemID "), ", ")
for I=0 to UBound(Items)
if len(Basket)=0 then
Basket= " ' "&Items(I)& " ' "
else if InStr( Basket,Items(I) ) <= 0 then
Basket = Basket& ", ' "&Items(I) & " ' "
end if
next
------解决方案--------------------else if写错了,应该是elseif,else与 if之间不能有空格
------解决方案-------------------- <%
Response.buffer=true
Basket= " "
Items=Split(Request( "ItemID "), ", ")
'上一页应该传入参数ItemID,如:http://*******/index.asp?ItemID=1,2,3,4,5
for I=0 to UBound(Items)
if len(Basket)=0 then
Basket= " ' "&Items(I)& " ' "
elseif InStr( Basket,Items(I) ) <= 0 then
'将else if改为elseif
Basket = Basket& ", ' "&Items(I) & " ' "
end if
next
%>