how to prevent default behaviour of an form sumitevent in javascript code example Example: event preventdefault event.preventDefault()