Answers for "display form input on console jquery"

0

display form input on console jquery

var nameInput = document.getElementById('name');

document.querySelector('form.pure-form').addEventListener('submit', function (e) {

    //prevent the normal submission of the form
    e.preventDefault();

    console.log(nameInput.value);    
});
Posted by: Guest on August-04-2020

Code answers related to "display form input on console jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language