📌  相关文章
📜  在哪里添加 const form = document.querySelector(".top-banner form"); form.addEventListener("提交", e => { e.preventDefault(); const inputVal = input.value; }); - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:34.484000             🧑  作者: Mango

代码示例1
const form = document.querySelector(".top-banner form");
 
form.addEventListener("submit", e => {
  e.preventDefault();
  const inputVal = input.value;
});