how to stop page refresh on a form without submit button in javascript code example Example: submit form javascript without refresh event.preventDefault()