asp select
dima(20)worktime=rst("worktime")worktime=split(worktime,",")'输出全部值dimi:i=ubound(workt...
dim a(20)
worktime=rst("worktime")
worktime=split(worktime,",")
'输出全部值
dim i:i=ubound(worktime)
for k=0 to i
a(k)=Trim(worktime(k))
response.write(worktime(k))
select case a(k)
case "monam"
tablestyle11 = "color = red"
case "monpm"
tablestyle12 = "color = red"
case "monnt"
tablestyle13 = "color = red"
case "tueam"
tablestyle14 = "color = red"
case "tuepm"
tablestyle15 = "color = red"
case "tuent"
end select
next
<tr>
<td<%=tablestyle11%>></td>
<td<%=tablestyle12%>></td>
<td<%=tablestyle13%>></td>
<td<%=tablestyle14%>></td>
<td <%=tablestyle15%>></td>
</tr>
其中worktime是monam,monpm,tuepm,tuent
数组a(k)输出monammonpmtuepmtuent中间没有空格
但是在select case中出现问题,表格中没有显示出颜色 展开
worktime=rst("worktime")
worktime=split(worktime,",")
'输出全部值
dim i:i=ubound(worktime)
for k=0 to i
a(k)=Trim(worktime(k))
response.write(worktime(k))
select case a(k)
case "monam"
tablestyle11 = "color = red"
case "monpm"
tablestyle12 = "color = red"
case "monnt"
tablestyle13 = "color = red"
case "tueam"
tablestyle14 = "color = red"
case "tuepm"
tablestyle15 = "color = red"
case "tuent"
end select
next
<tr>
<td<%=tablestyle11%>></td>
<td<%=tablestyle12%>></td>
<td<%=tablestyle13%>></td>
<td<%=tablestyle14%>></td>
<td <%=tablestyle15%>></td>
</tr>
其中worktime是monam,monpm,tuepm,tuent
数组a(k)输出monammonpmtuepmtuent中间没有空格
但是在select case中出现问题,表格中没有显示出颜色 展开
2个回答
展开全部
很简单的问题啊,<td>里面是不支持color属性的,所以怎么可能会有颜色
ASP select case 这里改成
select case a(k)
case "monam"
tablestyle11 = "color:red"
case "monpm"
tablestyle12 = "color:red"
case "monnt"
tablestyle13 = "color:red"
case "tueam"
tablestyle14 = "color:red"
case "tuepm"
tablestyle15 = "color:red"
case "tuent"
end select
表格部分你改成这样
<tr>
<td style="<%=tablestyle11%>"></td>
<td style="<%=tablestyle12%>"></td>
<td style="<%=tablestyle13%>"></td>
<td style="<%=tablestyle14%>"></td>
<td style="<%=tablestyle15%>"></td>
</tr>
ASP select case 这里改成
select case a(k)
case "monam"
tablestyle11 = "color:red"
case "monpm"
tablestyle12 = "color:red"
case "monnt"
tablestyle13 = "color:red"
case "tueam"
tablestyle14 = "color:red"
case "tuepm"
tablestyle15 = "color:red"
case "tuent"
end select
表格部分你改成这样
<tr>
<td style="<%=tablestyle11%>"></td>
<td style="<%=tablestyle12%>"></td>
<td style="<%=tablestyle13%>"></td>
<td style="<%=tablestyle14%>"></td>
<td style="<%=tablestyle15%>"></td>
</tr>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询