1var nameInput = document.getElementById('name');
2
3document.querySelector('form.pure-form').addEventListener('submit', function (e) {
4
5 //prevent the normal submission of the form
6 e.preventDefault();
7
8 console.log(nameInput.value);
9});