Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

$("#id").submit in vanilla

var yourElement = document.getElementById("yourElementID");

yourElement.addEventListener("submit", function(e) {
  
  if(something)
  	e.preventDefault(); // // stop form submission
  
  // add your code HERE
});
 
PREVIOUS NEXT
Tagged: #vanilla
ADD COMMENT
Topic
Name
2+2 =