惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
V
Visual Studio Blog
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
博客园 - 三生石上(FineUI控件)
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
A
About on SuperTechFans
J
Java Code Geeks
博客园_首页
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Full Disclosure
P
Proofpoint News Feed
The Register - Security
The Register - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
aimingoo的专栏
aimingoo的专栏
有赞技术团队
有赞技术团队
P
Privacy International News Feed
美团技术团队
W
WeLiveSecurity
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Schneier on Security
Schneier on Security
Engineering at Meta
Engineering at Meta
Cyberwarzone
Cyberwarzone
Microsoft Security Blog
Microsoft Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
G
GRAHAM CLULEY
H
Heimdal Security Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
博客园 - 司徒正美
P
Privacy & Cybersecurity Law Blog
D
DataBreaches.Net
F
Fortinet All Blogs
博客园 - 【当耐特】
雷峰网
雷峰网
腾讯CDC
Hacker News - Newest:
Hacker News - Newest: "LLM"
Webroot Blog
Webroot Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
MongoDB | Blog
MongoDB | Blog

博客园 - bwteacher

fastadmin中前端表格中字段状态动态加载问题 mysql实用 mysql操作错误 fastadmin操作 fastadmin下的多级联动 CentOS7安装Python3.10环境 jdk-24及tomcat-11.0.9(解压版)安装配置 mermaid基于 JavaScript 的图表绘制工具 HbuilderX 小随笔 v-bind和v-model的区别 v-if和v-show的区别 uniapp中@tap与@click点击事件的差异 PHP常用数学函数 距离-有这么多类 bootstrap.table汇总 selectpage汇总 jQuery没有匹配到任何内容,返回什么? js数组常用方法 thinkphp控制器名称命名相关 php常见错误码 ThinkPHP的join关联查询不使用默认的表前缀 阿里云虚拟主机创建https
表单提交fastadmin form
bwteacher · 2025-07-31 · via 博客园 - bwteacher

1、引入form组件

require(['form'], function(Form){});

2、生成form元素

3、绑定事件之验证(也可以绑定总表单事件Form.events.bindevent(form))

Form.api.bindevent(form, success, error, submit);

4、提交

//提交表单的方法,在表单完成验证后进行提交
Form.api.submit(form, success, error, submit);

例子:

Form.api.bindevent($("form[role=form]"), function(data, ret){
    //如果我们需要在提交表单成功后做跳转,可以在此使用location.href="链接";进行跳转
    Toastr.success("成功");
}, function(data, ret){
      Toastr.success("失败");
}, function(success, error){
    //bindevent的第三个参数为提交前的回调
    //如果我们需要在表单提交前做一些数据处理,则可以在此方法处理
    //注意如果我们需要阻止表单,可以在此使用return false;即可
    //如果我们处理完成需要再次提交表单则可以使用submit提交,如下
    //Form.api.submit(this, success, error);
    return false;
});