卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

js如何創(chuàng)建表格 怎么用js做一個表格?

怎么用js做一個表格?通過動態(tài)創(chuàng)建table,tr,td的方式進行表格創(chuàng)建function autocreate(){//創(chuàng)建table表格var table=document.createEleme

怎么用js做一個表格?

通過動態(tài)創(chuàng)建table,tr,td的方式進行表格創(chuàng)建function autocreate(){//創(chuàng)建table表格var table=document.createElement("table")table.setAttribute("border","1")table.setAttribute("background","red")//獲取行數值var line=document.getElementById("line").value//獲取列數值var list=document.getElementById("list").valuefor(var i=1i<=linei ){//alert(line)//創(chuàng)建trvar tr=document.createElement("tr")for(var j=1j<=listj ){//alert(list)//創(chuàng)建tdvar td=document.createElement("td")td.innerHTML=i*jtr.appendChild(td)}table.appendChild(tr) }document.getElementById("d1").appendChild(table)}