Jump to content
Fórum Script Brasil
  • 0

Como Alterar Deixar Cor Listado De Uma Tabela


Guest - Juliana -

Question

11 answers to this question

Recommended Posts

  • 0

Olha o codigo...talvez seja melhor para entender..

<%

If cor = "#FDD30E" Then

cor = "#ffffcc"

Else cor = "#FDD30E"

End If

%>

<tr bgcolor="<%=cor%>">

<%do while rs.eof=false %>

<td nowrap width="14%" border="0" ><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Empresa")%></font></td>

<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Endereco")%></font> </td>

<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Bairro")%></font> </td>

<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Cidade")%> </font> </td>

<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Telefone")%></font> </td>

<% if rs("site")<>"-" then%>

<td nowrap width="14%" border="0"><a href ="Http://<%=rs("site")%>">

<font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Site")%></font> </td></a>

<%else%>

<td nowrap align=center width="14%"><a href="NaoSite.asp"><font face="Arial Unicode MS" size="2" color="#2165A5" border="0"><%=rs("Site")%></font></a></td></a>

<%end if%>

<td nowrap align=center width="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Email")%></font> </td>

</tr>

<%rs.MoveNext

loop%>

Link to comment
Share on other sites

  • 0

ponha o

<%
If cor = "#FDD30E" Then 
cor = "#ffffcc" 
Else cor = "#FDD30E"
End If
%>

<tr bgcolor="<%=cor%>">
dentro do while. assim:
<%do while rs.eof=false %> 

<%
If cor = "#FDD30E" Then 
cor = "#ffffcc" 
Else cor = "#FDD30E"
End If
%>

<tr bgcolor="<%=cor%>">
<td nowrap width="14%" border="0" ><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Empresa")%></font></td>
<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Endereco")%></font> </td>
<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Bairro")%></font> </td>
<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Cidade")%> </font> </td>
<td nowrap width="14%" border="0"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Telefone")%></font> </td>
<% if rs("site")<>"-" then%>
<td nowrap width="14%" border="0"><a href ="Http://<%=rs("site")%>">
<font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Site")%></font> </td></a>

<%else%>
<td nowrap align=center width="14%"><a href="NaoSite.asp"><font face="Arial Unicode MS" size="2" color="#2165A5" border="0"><%=rs("Site")%></font></a></td></a>
<%end if%>
<td nowrap align=center width="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Email")%></font> </td>



</tr>
<%rs.MoveNext
loop%>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.6k
×
×
  • Create New...