javascript の関数から td の「onclick」の値を変更しようとしています。考えられることはすべて試しましたが、インターネットで検索しましたが、以下のコード以外は何も機能しませんでしたが、問題は、onclick の値を変更するのではなく、必要なものを実行していることです。 .
<div align="center" id="bodyC">
<table width="800" height="410">
<td class="bodyCC">
<table id="MYtable" class="MYtable" border="0" width="100%" height="100%" cellpadding="50">
<td id="one" class="one" onclick=""></td>
<td id="two" class="two" onclick=""></td>
<td id="three" class="three" onclick=""></td>
</table>
</td>
</table>
</div>
function download()
{
<!-- this function is called when the "Download" button on the website's menu is pressed, and is soppused to change the "body" table so when the sells are clicked an alert will pop.-->
document.getElementById('one').onclick=alert("A..!");
document.getElementById('two').onclick=alert("B..!");
document.getElementById('three').onclick=alert("C..!");
}
助けはありますか?
ps エラーはありません。