我写了一些代码来找出 3 个变量中最低的然后显示它,但我得到“'If' 运算符需要两个或三个操作数”。我不确定问题是什么,任何帮助将不胜感激。
<%
dim HP_RegularPayment As Integer = HP_RegularPayment
dim LPC_RegularPayment As Integer = LPC_RegularPayment
dim PCP_RegularPayment As Integer = PCP_RegularPayment
if HP_RegularPayment < LPC_RegularPayment and if HP_RegularPayment < PCP_RegularPayment then
%>
<div id="detailsprice" style="height:70px; padding-top:5px;">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
%><br /> <span style="font-size:12px;">Or £<%Response.Write(HP_RegularPayment) %> Per Month With HP Finance</span> </div> <%
else if LPC_RegularPayment < HP_RegularPayment and if LPC_RegularPayment < PCP_RegularPayment then
%>
<div id="detailsprice" style="height:70px; padding-top:5px;">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
%><br /> <span style="font-size:12px;">Or £<%Response.Write(LPC_RegularPayment) %>
Per Month With LP Finance</span> </div> <%
else if PCP_RegularPayment < HP_RegularPayment and if PCP_RegularPayment < LPC_RegularPayment then
%>
<div id="detailsprice" style="height:70px; padding-top:5px;">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
%><br /> <span style="font-size:12px;">Or £<%Response.Write(PCP_RegularPayment) %> Per Month With PCP Finance</span> </div> <%
else%>
<div id="detailsprice">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
end if%>
谢谢刘易斯