随机输出颜色值.asp

来自「较为详细的介绍了asp自定义的各种函数,方便asp的各种开发.」· ASP 代码 · 共 26 行

ASP
26
字号
<%
dim temp1,temp2,thecolor,i
thecolor="#"
for i=0 to 5
randomize
temp1=int(10*rnd)
if temp1>=5 then
   select case temp1
          case "5" thecolor=thecolor&"A"
          case "6" thecolor=thecolor&"B"
          case "7" thecolor=thecolor&"C"
          case "8" thecolor=thecolor&"D"
          case "9" 
                   temp2=int(10*rnd)
                   if temp2>=5 then
                      thecolor=thecolor&"E"
                   elseif temp2<5 then
                      thecolor=thecolor&"F"
                   end if
   end select
elseif temp1<5 then
    thecolor=thecolor&temp1
end if
next
response.write thecolor
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?