扫码关注官方订阅号
表单末尾有一个提交按钮。
我已将以下条件添加到提交按钮:
onClick="this.disabled=true; this.value='Sending…'; this.form.submit();"
但是当跳转到下一页时,参数没有传递,传递的是空值。
您应该首先提交表单,然后更改提交的值:
onClick="this.form.submit(); this.disabled=true; this.value='Sending…'; "
您可能提交了两次表单。 删除 this.form.submit() 或在末尾添加 return false。
this.form.submit()
return false
你最终应该得到onClick="this.disabled=true; this.value='Sending…';"
onClick="this.disabled=true; this.value='Sending…';"
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
您应该首先提交表单,然后更改提交的值:
您可能提交了两次表单。 删除
this.form.submit()
或在末尾添加return false
。你最终应该得到
onClick="this.disabled=true; this.value='Sending…';"