Disable submit button after click: step-by-step guide
P粉818317410
P粉818317410 2023-10-13 12:49:31
0
2
529

There is a submit button at the end of the form.

I have added the following conditions to the submit button:

onClick="this.disabled=true;
this.value='Sending…';
this.form.submit();"

But when jumping to the next page, the parameters are not passed and a null value is passed.

P粉818317410
P粉818317410

reply all(2)
P粉455093123

You should submit the form first and then change the submitted value:

onClick="this.form.submit(); this.disabled=true; this.value='Sending…'; "
P粉133321839

You may have submitted the form twice. Remove this.form.submit() or add return false at the end.

You should end up with onClick="this.disabled=true; this.value='Sending…';"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!