[求助]怎样才能把两个网页连起来,错在那里!急
[求助]大家帮帮我,怎样才能把两个网页连起来,错在那里!<HTML>
<HEAD>
<TITLE>shopping</TITLE>
</HEAD>
<BODY>
<%
Sub goods_init
name(0)="方便面"
price(0)=1
name(1)="火腿肠"
price(1)=2
name(2)="矿泉水"
price(2)=2
name(3)="雀巢咖啡"
price(3)=50
name(4)="牛奶"
price(4)=20
name(5)="毛巾"
price(5)=5
End Sub
Dim name(5)
Dim price(5)
goods_init
%>
<Form action="server.asp" method="post" name="list">
<table border=1 width=60% align=center>
<font size=7 color=green>
<caption>清单</caption></font>
<tr>
<td width=40% align=center>商品名称</td>
<td width=20% align=center>单价</td>
<td width=40% align=center>订购数量</td>
</tr>
<tr>
<% For i=0 To 5%><tr>
<td width=30% align=center><%=name(i)%></td>
<td width=30% align=center><%=price(i)%></td>
<td width=30% align=center>
<input type=text size=10 maxlength=5 name=num<%=i%> value=0>
</td>
</tr>
<%next%>
</TABLE>
<br>
<p align=center>
<input type=button value=提交 onclick=check()>
<input type=reset value=重填 onclick=reset()>
</p>
</form>
</BODY>
</HTML>
<%@ language=VBScript%>
<%
Sub goods_init
name(0)="方便面":price(0)=1:name(1)="火腿肠":price(1)=2:name(2)="矿泉水":price(2)=2:name(3)="雀巢咖啡":price(3)=50:name(4)="牛奶":price(4)=20:name(5)="毛巾":price(5)=5
End Sub
Dim name(5)
Dim price(5)
goods_init
Dim num(5)
num(0)=CInt(request.Form("num0")):num(1)=CInt(request.Form("num1")): num(2)=CInt(request.Form("num2")):num(3)=CInt(request.Form("num3")):
num(4)=Cint(request.Form("num4")):num(5)=CInt(request.Form("num5"))
sum=0
For i=0 To 5 Step 1
sum=sum+num(i)*price(i)
Next
Dim bill
bill=sum
If bill>1000 Then
bill=Round(bill*0.7,2)
Else
If bill>500 Then
bill=Round(bill*0.8,2)
If bill>100 Then
bill=Round(bill*0.9,2)
End If
End if
End if
%>
<HTML>
<HEAD>
<TITLE> 账单</TITLE>
</HEAD>
<BODY>
<table border=1 width=60% align=center>
<tr>
<td width=40% align=center>商品名称</td>
<td width=20% align=center>单价</td>
<td width=40% align=center>订购数量</td>
</tr>
<%For i=0 To 5%></tr>
<td width=30% align=center><%=name(i)%></td>
<td width=30% align=center><%=price(i)%></td>
<td width=30% align=center><%=num(i)%></td>
</tr>
<%next%>
</table>
<br>
<p align=center>
you consume sum $<%=sum%><br>
at a discount $<%=bill%></p>
</BODY>
</HTML>