I was bored so I made this. Might be a bit better than the last example.
<table cellspacing =0 cellpadding =0 border = 1 bordercolor = "#8EE5EE">
<tr>
<td bgCol = "#8EE5EE" id = "1" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">01</td>
<td id = "2" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">02</td>
<td id = "3" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">03</td>
<td id = "4" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">04</td>
<td id = "5" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">05</td>
</tr>
<tr>
<td id = "6" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">06</td>
<td id = "7" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">07</td>
<td id = "8" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">08</td>
<td id = "9" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">09</td>
<td id = "10" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id,this.bgCol)" onmouseout = "changeColBack(this.id)">10</td>
</tr>
<tr>
<td id = "11" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">11</td>
<td id = "12" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">12</td>
<td id = "13" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">13</td>
<td id = "14" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">14</td>
<td id = "15" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id,this.bgCol)" onmouseout = "changeColBack(this.id)">15</td>
</tr>
<tr>
<td id = "16" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">16</td>
<td id = "17" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">17</td>
<td id = "18" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">18</td>
<td id = "19" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id, this.bgCol)" onmouseout = "changeColBack(this.id)">19</td>
<td id = "20" bgCol = "#8EE5EE" onmouseover = "checkNo(this.id,this.bgCol)" onmouseout = "changeColBack(this.id)">20</td>
</tr>
</table>
<br><input type = "text" id = "change" size = 14><br><br>
<script language ="javascript">
function checkNo(theId, theColor){
var theInput = document.getElementById("change")
var theCell = document.getElementById(theId).style.backgroundCol or = theColor
theInput.value = "Cell Number: " + theId
}
function changeColBack(theId)
{
var theTd = document.getElementById(theId)
theTd.style.backgroundColor = "white"
}
</script>
Cheers!
Joe
|