-
Hi there, I would like to get the proper syntax to change the text value of a cell wihtin a table. I was thinking that I could do it like this but it didn't quite work:
<table id="mytable" border="1" cellspacing="1" width="500"
<tr>
<td id="A1" width="50" align="center" text="Monday"></td>
<td id="A2" width="50" align="center" text="Tuesday"></td>
<td id="A3" width="50" align="center" text="Wednesday"><td>
</tr>
</table>
<input id= buton1 type="button" value="change Day">
sub button1_onclick()
mytable.cells.item(A1).style.text = "Saturday"
end sub
I know the above syntax isn't quite right but if you understand what I'm trying to do, please send your suggestions for a better way to do it.
-
Code:
<HTML>
<HEAD>
<SCRIPT language="vbScript">
<!--
Sub button1_onclick
mytable.cells.item("A1").innertext = "Saturday"
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<TABLE id="mytable" border="1" cellspacing="1" width="500"
<TR>
<TD id="A1" width="50" align="center">Monday></TD>
<TD id="A2" width="50" align="center">Tuesday></TD>
<TD id="A3" width="50" align="center">Wednesday><td>
</TR>
</TABLE>
<INPUT id=button1 type="button" value="Change Day">
</BODY>
</HTML>
You were close...