document.getElementById("td1").write(a1); - Почему не работает?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>15</title>
</head>
<body>
<table align="center" bgcolor="#FAEBD7" border="9" bordercolor="#DEB887" height="320px" width="320px">
<tr align="center">
<td bgcolor="#F0F8FF" width="80px" id="td1"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
</tr>
<tr align="center">
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
</tr>
<tr align="center">
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
</tr>
<tr align="center">
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
<td bgcolor="#F0F8FF" width="80px"></td>
</tr>
</table>
<script src = "/js/15.js"></script>
</body>
</html>
function ChangeTextLine()
{
var a1 = Math.floor(Math.random()*15 + 1);
var a2 = Math.floor(Math.random()*15 + 1);
var a3 = Math.floor(Math.random()*15 + 1);
var a4 = Math.floor(Math.random()*15 + 1);
var a5 = Math.floor(Math.random()*15 + 1);
var a6 = Math.floor(Math.random()*15 + 1);
var a7 = Math.floor(Math.random()*15 + 1);
var a8 = Math.floor(Math.random()*15 + 1);
var a9 = Math.floor(Math.random()*15 + 1);
var a10 = Math.floor(Math.random()*15 + 1);
var a11 = Math.floor(Math.random()*15 + 1);
var a12 = Math.floor(Math.random()*15 + 1);
var a13 = Math.floor(Math.random()*15 + 1);
var a14 = Math.floor(Math.random()*15 + 1);
var a15 = Math.floor(Math.random()*15 + 1);
document.getElementById("td1").write(a1);
}
window.onload = ChangeTextLine;