Untitled

mail@pastecode.io avatar
unknown
javascript
4 days ago
294 B
4
Indexable
Never
const form = document.querySelector("form");

form.addEventListener("submit", (e) => {
  e.preventDefault();
  let cena = parseInt(e.target["promocja"].value);
  cena -= 10;
  const p = document.createElement("p");
  p.innerText = `cena promocyjna: ${cena}`;
  e.target.after(p);
});
Leave a Comment