等下一个天亮什么梗:这段ASP代码是什么意思?

来源:百度文库 编辑:中科新闻网 时间:2024/04/27 17:47:08
num(8)=clng(dbstr("tm"))
for j=1 to 36
select case j
case clng(dbstr("p1")),clng(dbstr("p2")),clng(dbstr("p3")),clng(dbstr("p4")),clng(dbstr("p5")),clng(dbstr("p6")),num(7)
if j<10 then j="0"&j
info="<font color=blue>"& j & "</font>"
case num(8)
if j<10 then j="0"&j
info="<font color=red>"& j & "</font>"
case else
info=" "
end select
response.write "<td align=center>"& info &"</td>"

next
response.write "</tr>"

重要是这段代码:if j<10 then j="0"&j ----------j="0"&j 是什么意思?

加入j="1"
那么j="0"&j就是让j="01"

这段代码很简单
j="0"&j 的意思是 将0和自己传给自己
比如j是3 那j="0"&j 后 j就是03
j在这里是文字型

asp里面对变数的型要求不是很高,所以有时反而难懂。