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)">

Красный

Зеленый

Синий

отправить

бббб



Индекс Дата Книга Автор Год изд-я Жанр Объём Состояние Год при-я Цена
08/02/2025
1 Дата Малахитовая шкатулка П.П.Бажов 2009 Сказка 300 хор 2010 450

console.log(htmlString)

/////<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





Тег table

Дата Вес кг.
Ячейка 1 Ячейка 2


hhhhhhh



Table insertRow() method in HTML

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

function addRow(html1) {

let tableRef = document.getElementById(html1);

let newRow = tableRef.insertRow(-1);

let newCell = newRow.insertCell(0);

let newText = document.createTextNode("New bottom row");
newCell.appendChild(newText);
}

addRow("html1")

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


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)">

+
=
60

mmmm

var table = "

";
for (var VAL of ARRAY) { table += `

`; }
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);

ппппппппппппппппппппппппппппппппп

Top