+ 1
how can I set the number inside table to change randomly
2 Answers
+ 3
This can help.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<table>
<tr>
<td id="randInt"></td>
</tr>
</table>
<script>
function randGenerate () {
var random = Math.floor(Math.random() * 100);
return random;
}
document.getElementById("randInt").innerHTML = randGenerate()
</script>
</body>
</html>
0
what do you mean change randomly? at this stage all content is inputted into do manually.