mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
51 lines
883 B
HTML
51 lines
883 B
HTML
|
<head>
|
||
|
<script>
|
||
|
var selectedCell = null;
|
||
|
|
||
|
function select(e) {
|
||
|
if (selectedCell) {
|
||
|
selectedCell.style.backgroundColor="white";
|
||
|
selectedCell.style.color="black";
|
||
|
}
|
||
|
selectedCell = this;
|
||
|
this.style.backgroundColor="blue";
|
||
|
this.style.color="white";
|
||
|
}
|
||
|
|
||
|
function init() {
|
||
|
var cells = document.getElementsByTagName("TD");
|
||
|
for (var i=0; i<cells.length; i++) {
|
||
|
cells[i].onmousedown=select;
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onload="init()">
|
||
|
click on a cell, you may have to load the doc twice
|
||
|
<BR>
|
||
|
<table id="mytable" border=1 cellspacing=3 cellpadding=10>
|
||
|
<tr>
|
||
|
<td>Apples</td>
|
||
|
<td>Oranges</td>
|
||
|
<td>Peaches</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Guitar</td>
|
||
|
<td>Violin</td>
|
||
|
<td>Bass</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Basketball</td>
|
||
|
<td>Baseball</td>
|
||
|
<td>Football</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
|
||
|
<!--
|
||
|
<table border=3 bordercolor=red stylex="border: 3px solid red">
|
||
|
<tr>
|
||
|
<td>foo</td></tr></table>
|
||
|
|
||
|
-->
|