📌  相关文章
📜  $("#id").submit in vanilla - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:29.678000             🧑  作者: Mango

代码示例1
var yourElement = document.getElementById("yourElementID");

yourElement.addEventListener("submit", function(e) {
  
  if(something)
      e.preventDefault(); // // stop form submission
  
  // add your code HERE
});