This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Yoink: https://www.javascripttutorial.net/web-apis/javascript-formdata/ | |
const btn = document.querySelector('#submit-btn-id'); | |
const form = document.querySelector('#my-form-id'); | |
btn.addEventListener('click', (e) => { | |
// prevent the form from submitting | |
// or uncomment the debugger statment below for a breakpoint | |
// if needing to also send the data for testing | |
e.preventDefault(); |
OlderNewer