Dim num1,num2,num3,num4,num5,num6,num7,AllNum,resultNum,temp
num1 = rs("num1")
num2 = rs("num2")
num3 = rs("num3")
num4 = rs("num4")
num5 = rs("num5")
num6 = rs("num6")
num7 = rs("tm")
AllNum = num1 & -num2 & -num3 & -num4 & -num5 & -num6 & -num7
For i=1 To Len(AllNum)
On Error Resume Next
temp = Mid(AllNum,i,1)
temp = CInt(temp)
If Err then
temp = "<font color=""" & getFontColor(temp) & """>" & temp & "</font>"
End if
resultNum = resultNum & temp
Next
Response.write "<MARQUEE scrollAmount=""4"" width=""200"">" & resultNum & "</MARQUEE>"
Function getFontColor(ByVal myStr)
Dim tempStr
If tempStr>="1" And tempStr<="10" Then
getFontColor = "red"
ElseIf tempStr>="11" And tempStr<="20" Then
getFontColor = "blue"
ElseIf tempStr>="21" And tempStr<="30" Then
getFontColor = "green"
End if
End function
%>
以上代码做出来的格式为1-2-3-4-5-6-7,怎么变为1-2-3-4-5-6 T 7 T是红色的?
我想设置num1到num7中是打1.2.7.8.12.13.18.19.23.24.29.30.34.35.40.45.46显示红色
蓝色:3.4.9.10.14.15.20.25.26.31.36.37.41.42.47.48
绿色:5.6.11.16.17.21.22.27.28.32.33.38.39.43.44
求完整代码+解释,QQ34472021,10企鹅B答谢
num1 = rs("num1")
num2 = rs("num2")
num3 = rs("num3")
num4 = rs("num4")
num5 = rs("num5")
num6 = rs("num6")
num7 = rs("tm")
AllNum = num1 & -num2 & -num3 & -num4 & -num5 & -num6 & -num7
For i=1 To Len(AllNum)
On Error Resume Next
temp = Mid(AllNum,i,1)
temp = CInt(temp)
If Err then
temp = "<font color=""" & getFontColor(temp) & """>" & temp & "</font>"
End if
resultNum = resultNum & temp
Next
Response.write "<MARQUEE scrollAmount=""4"" width=""200"">" & resultNum & "</MARQUEE>"
Function getFontColor(ByVal myStr)
Dim tempStr
If tempStr>="1" And tempStr<="10" Then
getFontColor = "red"
ElseIf tempStr>="11" And tempStr<="20" Then
getFontColor = "blue"
ElseIf tempStr>="21" And tempStr<="30" Then
getFontColor = "green"
End if
End function
%>
以上代码做出来的格式为1-2-3-4-5-6-7,怎么变为1-2-3-4-5-6 T 7 T是红色的?
我想设置num1到num7中是打1.2.7.8.12.13.18.19.23.24.29.30.34.35.40.45.46显示红色
蓝色:3.4.9.10.14.15.20.25.26.31.36.37.41.42.47.48
绿色:5.6.11.16.17.21.22.27.28.32.33.38.39.43.44
求完整代码+解释,QQ34472021,10企鹅B答谢