prevent submit after check javascritp code example Example: javascript prevent form submit <form name="foo" onsubmit="return false">