倒不是说用别的方法,而且想问一下,如果color有5个或6个,时候,怎么编 下面是四个会出现的情况
<% if color1 <> color2 and color1 <> color3 and color1 <> color4 and color2<>color3 and color2<>color4 and color3<>color4
then%>
zhong1=color1
zhong2=color2
zhong3=color3
zhong4=color4
<%elseif color1=color2 and color1<>color3 and color1<>color4 and color3<>color4 then%>
zhong1=color1+color2
zhong3=color3
zhong4=color4
<%elseif color1=color4 and color1<>color2 and color1<>color3 and color2<>color3 then%>
zhong1=color1+color4
zhong2=color2
zhong3=color3
<%elseif color1<>color2 and color2=color4 and color2<>color3 and color1<>color3 then%>
zhong1=color1
zhong2=color2+color4
zhong3=color3
<%elseif color1<>color2 and color2<>color3 and color3=color4 and color1<>color2 then%>
zhong1=color1
zhong2=color2
zhong3=color3+color4
<%elseif color1=color2 and color2=color3 and color3<>color4 then%>
zhong1=color1+color2+color3
zhong4=color4
<%elseif color1<>color2 and color2=color3 and color3=color4 then%>
zhong1=color1
zhong2=color2+color3+color4
<%elseif color1=color2 and color2=color4 and color3<>color4 then%>
zhong1=color1+color2+color4
zhong3=color3
<%elseif color1=color3 and color1=color4 and color1<>color2 then%>
zhong1=color1+color3+color4
zhong2=color2
<%elseif color1=color2 and color3=color4 and color1<>color3 then%>
zhong1=color1+color2
zhong3=color3+color4
<%elseif color1=color3 and color2=color4 and color1<>color2 then%>
zhong1=color1+color3
zhong2=color2+color4
<%elseif color1=color4 and color2=color3 and color1<>color2 then%>
zhong1=color1+color4
zhong2=color2+color3
<%elseif color1=color2 and color2=color3 and color3=color4 then%>
zhong1=color1+color4+color2+color3
<%end if%>
[[italic] 本帖最后由 刚开始 于 2007-12-24 12:59 编辑 [/italic]]