submit html form with javascript, preventdefault code example Example: javascript prevent form submit <form name="foo" onsubmit="return false">