Basic form submit

Why doesnt this work:

Entering anything into the form results in an Uncaught TypeError: Cannot read property 'value' of undefined

Solved, added name field to input and used event.preventDefault(); and event.target.namehere.value;.