cannot get property 'value' of null
hello i got some code which used to work in my previous javascripts and now it's giving me this damn error again i don't see what i am doing wrong could someone tell me please.
Code:
<html>
<head>
<script>
function fill() {
document.getElementById("content").innerHTML="";
var rij=parseFloat(document.getElementById("aap").value);
var kolom=parseFloat(document.getElementById("kolom").value);
for (i=0;i<kolom;i++) {
for (j=0;j<rij;j++) {
document.getElementById("content").innerHTML+="<input type='number' value='0' id='m"+i+j+"'>";
}
document.getElementById("content").innerHTML+="<br>";
}
}
</script>
</head>
<body id="content">
<input type="number" id="aap" value="2" /> x <input type="number" id="kolom" value='3'/><br>
<input type="button" onclick="fill()" value="matrix">
</body>
</html>