日期:2014-05-17  浏览次数:20862 次

一个关于随机函数的问题
总是调用不出来,烦死了~~~
代码如下,请高手看那里有问题
<%
Function   RndTxt(qq)
i=Int(Rnd()*9)+1
Select   Case   i
Case   1
qq   =   "a "
Case   2
qq   =   "aa "
Case   3
qq   =   "aaa "
Case   4
qq   =   "aaaa "
Case   5
qq   =   "aaaaa "
Case   6
qq   =   "aaaaaa "
Case   7
qq   =   "aaaaaaa "
Case   8
qq   =   "aaaaaaaa "
Case   9
qq   =   "aaaaaaaaa "
End   Select

End   Function
> %
mark= " <%=qq%> "

------解决方案--------------------
<%
Function RndTxt(qq)
randomize
i=Int(Rnd()*9)+1
Select Case i
Case 1
qq = "a "
Case 2
qq = "aa "
Case 3
qq = "aaa "
Case 4
qq = "aaaa "
Case 5
qq = "aaaaa "
Case 6
qq = "aaaaaa "
Case 7
qq = "aaaaaaa "
Case 8
qq = "aaaaaaaa "
Case 9
qq = "aaaaaaaaa "
End Select
RndTxt=qq
End Function
%>
mark= <% =RndTxt(0) %>