Formulario de preflio de JavaScript

const object = new URL(window.location.href);
object.searchParams.forEach((x, y) => document.getElementById(y).value = x);
lff