I need to select a form via native javascript (not jQuery) and prevent the form submission (preventDefault).
The trick is that the form does not have a name or id, a
Using querySelector and an event listener, it's almost like jQuery
querySelector
document.querySelector('#search form').addEventListener('submit', function(e) { e.preventDefault(); });
note that the script has to come after the elements, or use a DOM ready handler, so the elements are available.
FIDDLE