9/08/2015

Prevent form submit from submiting multiple times by jQuery

If you need to assign a click function dynamically, there is a way to ensure the click function is only assigned once and not duplicated.


Now I show one way based on jquery




       
                        # test
            if ($_POST) {
                print_r($_POST);
                $loop = 100000000;
                for ($i = 0; $i < $loop; $i++) {
                    $b+=1;
                }
                echo 'Completed';
            }
            ?>