submit form data without refreshing page code example
Example 1: submit form javascript without refresh
event.preventDefault()
Example 2: submit() refreshes the page
<form onsubmit="return false;">Form stuff in here</form>
event.preventDefault()
<form onsubmit="return false;">Form stuff in here</form>