search
HomeWeb Front-endJS TutorialExample sharing of form submission in EasyUI_jquery

Copy code The code is as follows:

$('#form').form({
url: 'test/add.do',
onSubmit : function() {
parent.$.messager.progress({
Title: 'Tips',
Text: 'Data processing, please wait....'
});
var gridValid = endEdit();//Sub table exits editing verification
if (!gridValid) {
parent.$.messager.progress('close');
Return false;
}
var isValid = $('#form').form('validate');
if (!isValid) {
parent.$.messager.progress('close');
Return false;
}
// Write the added, modified, and deleted data in the subtable to the hidden input
accept();
Return true;
},
success : function(result) {
parent.$.messager.progress('close');
Try {
Data = eval("(" result ")");// Convert JSON string into object
If (data && data.success) {
If (data.msg && data.msg != "")
       parent.$.messager.alert('prompt', data.msg);
      else
       parent.$.messager.alert('prompt', "Added successfully");
Parent.$.modalDialog.openner_grid.datagrid('reload');// Refresh Gird data
​ parent.$.modalDialog.handler.dialog('close');//Close the current modal window
} else
Parent.$.messager.alert('error', data.msg); // Operation failed
} catch (e) {
Parent.$.errorDialog(result);// Prompt server exception
}
}
});

The above is the entire content of this article, I hope it can be helpful to everyone.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
easyui是jquery插件吗easyui是jquery插件吗Jul 05, 2022 pm 06:08 PM

easyui是jquery插件。easyui是基于JQuery的一个前台ui界面的插件,用于帮助web开发者更轻松的打造出功能丰富并且美观的UI界面。easyui是个完美支持HTML5网页的框架,可以帮助开发者节省网页开发的时间和规模。

哪些JS事件不会向上冒泡?哪些JS事件不会向上冒泡?Feb 19, 2024 pm 09:56 PM

JS事件中有哪些不会冒泡的情况?事件冒泡(EventBubbling)是指在触发了某个元素的事件后,事件会从最内层元素开始沿着DOM树向上传递,直到最外层的元素,这种传递方式称为事件冒泡。但是,并不是所有的事件都能冒泡,有一些特殊情况下事件是不会冒泡的。本文将介绍在JavaScript中有哪些情况下事件不会冒泡。一、使用stopPropagati

Vue中如何实现表单的校验和提交Vue中如何实现表单的校验和提交Oct 15, 2023 am 11:14 AM

Vue中如何实现表单的校验和提交在Web开发中,表单是用户与网页进行交互的重要界面,表单中用户输入的数据需要进行校验和提交,以确保数据的合法性和完整性。Vue.js是一个流行的前端框架,它提供了便捷的表单校验和提交方法,使我们能够快速地实现表单功能。本文将介绍如何使用Vue.js来实现表单的校验和提交,并提供具体的代码示例。一、表单校验安装vee-valid

BinaryX再次更名FORM,还给社区的FOUR即将暴涨?BinaryX再次更名FORM,还给社区的FOUR即将暴涨?Mar 04, 2025 pm 12:00 PM

BinaryX的代币更名:从BNX到FOUR,再到FORM,战略调整背后的深层含义BinaryX近期将代币符号从$FOUR更改为$FORM,引发业界广泛关注。这并非BinaryX首次更名,其代币符号曾经历BNX到FOUR的转变。本文将深入探讨这一系列更名背后的战略意图。一、代币更名历程与战略考量BinaryX最初于2021年推出基于BNB链的$BNX代币,用于支持其Play-to-Earn(P2E)游戏生态。2024年初,为优化经济模型,BinaryX对$BNX进行了分割,并逐渐拓展至GameF

Vue中的v-on指令解析:如何处理表单提交事件Vue中的v-on指令解析:如何处理表单提交事件Sep 15, 2023 am 09:12 AM

Vue中的v-on指令解析:如何处理表单提交事件在Vue.js中,v-on指令用于绑定事件监听器,可以捕获并处理各种DOM事件。其中,处理表单提交事件是Vue中常见的操作之一。本文将介绍如何使用v-on指令处理表单提交事件,并提供具体的代码示例。首先,需要明确Vue中的表单提交事件指的是当用户点击submit按钮或按下回车键时触发的事件。在Vue中,可以通过

常见的jQuery事件列表常见的jQuery事件列表Feb 24, 2024 am 11:57 AM

【jQuery中常用的事件一览,需要具体代码示例】jQuery是一个流行的JavaScript库,广泛用于网页开发中。在jQuery中,事件处理是一个非常重要的部分,通过事件我们可以实现页面的交互和动态效果。本文将介绍jQuery中常用的事件,包括点击事件、鼠标事件、键盘事件等,并提供具体的代码示例。一、点击事件1.click事件click事件是元素被点击

如何结合Layui和jQuery打造优质网页?如何结合Layui和jQuery打造优质网页?Feb 22, 2024 pm 11:15 PM

如何结合Layui和jQuery打造优质网页?随着互联网技术的不断发展,前端开发也变得愈加重要。而Layui和jQuery作为两个常用的前端框架,它们的结合能够为网页开发带来更好的体验和更丰富的功能。本文将介绍如何结合Layui和jQuery打造优质网页,并提供具体的代码示例。Layui和jQuery介绍Layui是一款经典的前端UI框架,它提供了丰富的UI

如何利用Vue表单处理实现表单提交前的数据预处理如何利用Vue表单处理实现表单提交前的数据预处理Aug 10, 2023 am 09:21 AM

如何利用Vue表单处理实现表单提交前的数据预处理概述:在Web开发中,表单是平常最常见的元素之一。而在表单提交前,我们经常需要对用户输入的数据进行一些预处理,例如格式校验、数据转换等。Vue框架提供了方便易用的表单处理功能,本文将介绍如何利用Vue表单处理实现表单提交前的数据预处理。一、创建Vue实例和表单控件首先,我们需要创建一个Vue实例并定义一个包含表

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.