ecco un esempio:
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>esempio</title>
<script language="JavaScript" type="text/javascript">
<!--
function scrivi(testo) {
var myTextNode=document.createTextNode(testo);
document.getElementById('cella').replaceChild( myTextNode, document.getElementById('cella').firstChild);
}
//-->
</script>
</head>
<body>
<table>
<tr>
<td id="cella"></td>
</tr>
</table>
<input type="button" onclick="scrivi('ciao');" value="Click" />
</body>
</html>
ciao