Feat. Form default behaviour bypassed
Signed-off-by: Eoghan Conlon <git@eoghanconlon.ie>
This commit is contained in:
parent
a92bdbc921
commit
ff10493be9
1 changed files with 5 additions and 0 deletions
|
@ -24,5 +24,10 @@
|
||||||
const formEl = document.getElementById("reset");
|
const formEl = document.getElementById("reset");
|
||||||
formEl.addEventListener('submit', (listener) => formHandler(listener));
|
formEl.addEventListener('submit', (listener) => formHandler(listener));
|
||||||
|
|
||||||
|
function formHandler(listener){
|
||||||
|
listener.preventDefault();
|
||||||
|
alert("Default bypassed");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue