1document.getElementById("defaultsub").addEventListener("click", function(event){
2 if(document.querySelector('form').checkValidity()){
3 event.preventDefault();
4 console.log("Prevent default submission");
5 alert("ALERT!!!!!");
6}
7})
8