Js table generator with buttons
问题 I found this answer on the website. I was trying to get the buttons to render within the table but it just came up as text. Here's the code: function tableCreate() { var body = document.getElementsByTagName("body")[0]; var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); for (var j = 0; j <= 10; j++) { var row = document.createElement("tr"); for (var i = 0; i <10; i++) { var cell = document.createElement("td"); var btn = "<button>" + j +"-"+i+"</button>"