ASP网页调用数据库的数据的文字怎么改变颜色和字体?
subShowAllClass()ifrsBigClass.bofandrsBigClass.eofthenresponse.Write" 没有任何栏目"els...
sub ShowAllClass()
if rsBigClass.bof and rsBigClass.eof then
response.Write " 没有任何栏目"
else
dim sqlClass,rsClass,strClassName
rsBigClass.movefirst
do while not rsBigClass.eof
strClassName= "【<b>" & rsBigClass("BigClassName") & "</b>】<br><br>"
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
do while not rsClass.eof
strClassName=strClassName & " <a href='Product.asp?BigClassName=" & rsClass("BigClassName") & "&SmallClassName=" & rsClass("SmallClassName") & "'>" & rsClass("SmallClassName") & "</a> "
rsClass.movenext
loop
response.write strClassName & "<br><br>"
rsBigClass.movenext
loop
rsClass.close
set rsClass=nothing
end if
end sub
这段代码调用产品的分类,BIGCLASS显示的文字我改了,但是SMALLCLASS的文字怎么也改不了颜色,怎么改? 展开
if rsBigClass.bof and rsBigClass.eof then
response.Write " 没有任何栏目"
else
dim sqlClass,rsClass,strClassName
rsBigClass.movefirst
do while not rsBigClass.eof
strClassName= "【<b>" & rsBigClass("BigClassName") & "</b>】<br><br>"
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
do while not rsClass.eof
strClassName=strClassName & " <a href='Product.asp?BigClassName=" & rsClass("BigClassName") & "&SmallClassName=" & rsClass("SmallClassName") & "'>" & rsClass("SmallClassName") & "</a> "
rsClass.movenext
loop
response.write strClassName & "<br><br>"
rsBigClass.movenext
loop
rsClass.close
set rsClass=nothing
end if
end sub
这段代码调用产品的分类,BIGCLASS显示的文字我改了,但是SMALLCLASS的文字怎么也改不了颜色,怎么改? 展开
展开全部
sub ShowAllClass()
if rsBigClass.bof and rsBigClass.eof then
response.Write " 没有任何栏目"
else
dim sqlClass,rsClass,strClassName
rsBigClass.movefirst
do while not rsBigClass.eof
strClassName= "【<b>" & rsBigClass("BigClassName") & "</b>】<br><br>"
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
do while not rsClass.eof
strClassName=strClassName & " <a href='Product.asp?BigClassName=" & rsClass("BigClassName") & "&SmallClassName=" & rsClass("SmallClassName") & "'><font color=red>" & rsClass("SmallClassName") & "</font></a> "
rsClass.movenext
loop
response.write strClassName & "<br><br>"
rsBigClass.movenext
loop
rsClass.close
set rsClass=nothing
end if
end sub
就这样改的
if rsBigClass.bof and rsBigClass.eof then
response.Write " 没有任何栏目"
else
dim sqlClass,rsClass,strClassName
rsBigClass.movefirst
do while not rsBigClass.eof
strClassName= "【<b>" & rsBigClass("BigClassName") & "</b>】<br><br>"
sqlClass="select * from SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
do while not rsClass.eof
strClassName=strClassName & " <a href='Product.asp?BigClassName=" & rsClass("BigClassName") & "&SmallClassName=" & rsClass("SmallClassName") & "'><font color=red>" & rsClass("SmallClassName") & "</font></a> "
rsClass.movenext
loop
response.write strClassName & "<br><br>"
rsBigClass.movenext
loop
rsClass.close
set rsClass=nothing
end if
end sub
就这样改的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询