lab_3(full)
This commit is contained in:
parent
81aac2f8ec
commit
caa0bdea5c
14
js/lines.js
14
js/lines.js
@ -240,11 +240,7 @@ export async function UpdateCollection() {
|
||||
|
||||
const data = await getAllLines();
|
||||
|
||||
data.forEach((item) => {
|
||||
document.addEventListener("DOMContentLoaded", async (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
});
|
||||
data.forEach((item) => {
|
||||
|
||||
const div0 = document.createElement("div");
|
||||
div0.setAttribute("class", "col-md-3 product my-2");
|
||||
@ -268,13 +264,17 @@ export async function UpdateCollection() {
|
||||
div3.appendChild(h2);
|
||||
|
||||
const p1 = document.createElement("p");
|
||||
p1.textContent = item.data;
|
||||
p1.textContent = "Дата: " + item.date;
|
||||
div3.appendChild(p1);
|
||||
|
||||
const p2 = document.createElement("p");
|
||||
p1.textContent = item.price + "$";
|
||||
p2.textContent = "Цена: " + item.price + "₽";
|
||||
div3.appendChild(p2);
|
||||
|
||||
const p3 = document.createElement("p");
|
||||
p3.textContent = item.places.name;
|
||||
div3.appendChild(p3);
|
||||
|
||||
div0.appendChild(div2);
|
||||
div0.appendChild(div3);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user