My file which is called 'table.htm' (trying to make a table) is below:
<!DOCTYPE html>
<html lang="en-AU">
<head>
<script type="text/javascript">
var thOne = document.getElementById("thOne");
alert(thOne)
//thOne.innerHTML = String(thOne.value);
</script>
</head>
<body>
<table>
<tbody>
<tr id="trOne">
<th value="1" id="thOne">
</th>
<td value="" id="tdOne">
</td>
</tr>
</tbody>
</table>
</body>
</html>
It shouldn't alert null, but it does. The commented out line should set id("thOne").innerHTML to it's value (1 in a string) but instead says it does not have a value (as TypeError). I know that, but how do I set the innerHTML to '1'?
`
– Jaromanda X Jan 04 '17 at 00:48