Non so se intendi questo....
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
function changeColor(colore) {
document.all.tabella.style.backgroundColor = colore;
}
//-->
</script>
</head>
<body>
<table id="tabella" style="">
<tr>
<td>Questo è il testo</td>
</tr>
</table>
Inserisci il nome di un colore (es:red)
<input type="text" name="text">
<input type="button" value="Clicca" onclick="changeColor(document.all.text.value);"
</body>
</html>