📜  preventdefault 调用了两次 - 任何代码示例

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

代码示例1
$("#search").on('submit', function (e) { // change the element selector as id selector. 
   console.log('Form submitted')
   e.preventDefault();
  e.stopImmediatePropagation();
});