<html> <body> <div id="div00"> <input type="button" onclick="createLine()" value="Gimme more"></input> <input type="button" onclick="giveitout()" value="Give it out"></input> <br> <script> let i = 0; let a = new Array (1); let x = 6; let y = 12; let values; alert ("Hallo Welt"); function valuearrayinit () { var k, l; values = new Array (y); for (k = 0; k < y; k++) values [k] = new Array (x); i = x*y; } function valuearrayaddy () { y = y+1; values.length = y; values [length-1] = new Array (x); i = x*y; } function valuearrayaddx () { var k; x = x+1; for (k = 0; k < y; k++) values [k].length = x; i = x*y; } function valuearrayout () { var k, l; for (k = 0; k < y; k++) { for (l = 0; l < x; l++) { a [i] = document.createElement ("input"); a [i].type = "text"; a [i].id = i.toString (); a [i].value = values [k][l]; document.getElementById ("div00").appendChild (a [i]); i++; a.length = i; } p01 = document.createElement ("br"); //p01.innerText = ""; document.getElementById ("div00").appendChild (p01); } } function valuesinit () { var k, l; for (k = 0; k < y; k++) { for (l = 0; l < x; l++) { values [k][l] = k*x+l; } } } valuearrayinit (); valuesinit (); valuearrayout (); </script> </div> </body> </html>