17 lines
502 B
TypeScript
17 lines
502 B
TypeScript
|
import { Table, Cell } from "./classes";
|
||
|
|
||
|
const submit = document.getElementById("submitRowCol");
|
||
|
|
||
|
submit.addEventListener(
|
||
|
"click",
|
||
|
function initialTable() {
|
||
|
const rowElement = <HTMLInputElement>document.getElementById("totalRow");
|
||
|
const totalRow = Number(rowElement.value);
|
||
|
const colElement = <HTMLInputElement>document.getElementById("totalCol");
|
||
|
const totalCol = Number(colElement.value);
|
||
|
const table = new Table(totalRow, totalCol);
|
||
|
table.render(Cell);
|
||
|
},
|
||
|
false
|
||
|
);
|