report-design-javascript/src/script/main.ts

17 lines
502 B
TypeScript
Raw Normal View History

2018-10-15 15:21:18 +08:00
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
);