html Эксп табл
8888
////
<table id="demoA">
<tr> <td>A</td> <td>B</td> </tr>
</table>
<script>
function addRow (top) {
var table = document.getElementById("demoA");
if (top) { var row = table.insertRow(0); }
else { var row = table.insertRow(); }
var cell = row.insertCell();
cell.innerHTML = "AA";
cell = row.insertCell();
cell.innerHTML = "BB";
}
</script>
<input type="button" value="Add Bottom" onclick="addRow()">
<input type="button" value="Add Top" onclick="addRow(1)">
Красный
Зеленый
Синий
window.onload = function() {
var checkbox;
to_send. onclick = function()
{
checkbox = document.getElementsByName("co");
var str = "";
for(var i=0; i
/////<script>
function addRow (top) {
var table = document.getElementById("demoA");
if (top) { var row = table.insertRow(0); }
else { var row = table.insertRow(); }
var cell = row.insertCell();
cell.innerHTML = "AA";
cell = row.insertCell();
cell.innerHTML = "BB";
}
</script>
var cell = row.insertCell();
cell.innerHTML = "'';
cell = row.insertCell();
cell.innerHTML = "BB";
var vesValue = document.getElementsByName('txtves')[0].value
var imt = document.getElementById("imt").value;
console.log(ves)
hhhh
Дата | Вес кг. |
---|---|
Ячейка 1 | Ячейка 2 |
hhhhhhh
GeeksforGeeks
Table insertRow() method
To add a new row at the first
position of the table, double-click
the "Add Row" button.
Java | Fork Java |
Python | Fork Python |
output
tttttttt
eeeeeee
B |
var table = document.getElementById("html1");
var row = table.insertRow(0)
fffffff
fffffffff
ссссссс https://codedec.com/tutorials/create-dynamic-table-using-javascript/ Create dynamic table using JavaScript – CODEDEC
JavaScript. Учебник начального уровня (rtf) https://www.universalinternetlibrary.ru/book/40173/ogl.shtml
Create dynamic table in JavaScript
Note: If you leave the values blank, 10x10 table will be created by default.
Output:
fffffff
Row 1 |
ббббб
A | B | C |
<table id="demoA">
<tr> <td>A</td> <td>B</td> </tr>
</table>
<script>
function addRow (top) {
var table = document.getElementById("demoA");
if (top) { var row = table.insertRow(0); }
else { var row = table.insertRow(); }
var cell = row.insertCell();
cell.innerHTML = "AA";
cell = row.insertCell();
cell.innerHTML = "BB";
}
</script>
<input type="button" value="Add Bottom" onclick="addRow()">
<input type="button" value="Add Top" onclick="addRow(1)">
mmmm
var table = "
VAL |
";
document.getElementById("ID").innerHTML = table;
var table = document.createElement("table");
var row = table.insertRow();
for (var VAL of ARRAY) { let cell = row.insertCell(); cell.innerHTML = VAL; }
document.getElementById("ID").appendChild(table);
ппппппппппппппппппппппппппппппппп