问题描述
在使用 Form 表单提交时,使用 Button 按钮触发 Ajax 函数,提交请求后,无返回值。
解决
如果使用 <button></button> 触发函数,那应该放在 <form></form>的外面。
或者
添加 type 的值为 button
<button type = "button" ></button>
微信扫一扫
在使用 Form 表单提交时,使用 Button 按钮触发 Ajax 函数,提交请求后,无返回值。
如果使用 <button></button> 触发函数,那应该放在 <form></form>的外面。
或者
添加 type 的值为 button
<button type = "button" ></button>
相关推荐