0

I have two independent tables. How to manage when I mouse over one of the cell on Table 1 then cells which have the same values on Table 2 turn highlighted? I prefer to use html/css coding, not JQuery?

I worked on code below but no success.

<HTML>
<STYLE type=text/css>            
tr:hover td.highlight776{ background-color:red; }
tr:hover td.highlight970{ background-color:blue; }
tr:hover td.highlight1024{ background-color:magenta; }
tr:hover td.highlight1197{ background-color:yellow; }
tr:hover td.highlight1200{ background-color:orange; }
tr:hover td.highlight1015{ background-color:orange; }
</STYLE>

<HEAD>
<TITLE></TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator" content="CuteHTML">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">

<br><br>

Table 1
<Table border=1>

<tr>
<td class="highlight776">Proje 776</td>
</tr>
<tr>
<td class="highlight1015">Proje 1015</td>
</tr>
<tr>
<td class="highlight970">Proje 970</td>
</tr>
<tr>
<td class="highlight1024">Proje 1024</td>
</tr>
<tr>
<td class="highlight1197">Proje 1197</td>
<tr>
<td class="highlight1200">Proje 1200</td>
</tr>
</Table>

<br><br><br>

Table 2
<Table class="tahsis" border=1>
<tr>
 <td class="highlight776">776</td>
 <td class="highlight1015">1015</td>
 <td class="highlight776">776</td>
 <td class="highlight970">970</td>
 <td class="highlight1024">1024</td>
 <td class="highlight970">970</td>
</tr>

<tr>
 <td>970</td>
 <td>776</td>
 <td>776</td>
 <td>776</td>
 <td>1015</td>
 <td>1015</td>

<tr>
 <td>1015</td>
 <td>776</td>
 <td>970</td>
 <td>970</td>
 <td>1024</td>
 <td>970</td>
</tr>
</Table>

</BODY>
</HTML>
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • You'll need to use javascript. – Junius L Apr 25 '17 at 08:51
  • 1
    Possible duplicate of [Hover on element and highlight all elements with the same class](http://stackoverflow.com/questions/12786810/hover-on-element-and-highlight-all-elements-with-the-same-class) – Junius L Apr 25 '17 at 08:52

0 Answers0