How do I trigger a function while also preventing a HTML form from refreshing the page when a user hits the 'enter' key while an input element is selected?
==
I understand that <form onsubmit="return false;">
will prevent the page from reloading. But how do I also get it to trigger another function, say add();
...?