1.

How to translate a set of values to another set?

Answer»

There are two WAYS to stop a form

  • Return false inside function which is been called on form submit.

The sample CODE:

<script>   function formSubmit(){      return false;   } </script> <form onsubmit="return formSubmit();" >
  • By USING EVENT. preventDefault() to stop the default action on the event.

The sample code:

<form>  <button class='.submit' type="submit">Submit</button> </form> $(function(){    $('.submit').on('submit', function(event){        event.preventDefault(); }); })


Discussion

No Comment Found