jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了JQuery EasyUI 表单大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

EasyUI 创建异步提交表单

 

♦ 通过使用 easyui 表单插件来改变表单为 ajax表单。

  表单提交所有字段到后台服务器,服务器处理和发送一些数据返回到前端页面。我们接收返回数据,并将它显示出来。

♦ 创建表单(Form

<div class="easyui-panel" title="注册" style="width:500px;" align="center">
        <div style="padding:10px 60px 20px 60px;">
        <form id="ff" method="post" action="EmpServlet?m=regist">
            <table celLPADding="5" style="width:300px;">
                <tr>
                    <td>员工编号:</td>
                    <td><input class="easyui-textBox" type="text" name="empid"></input></td>
                </tr>
                <tr>
                    <td>员工姓名:</td>
                    <td><input class="easyui-textBox" id="name" type="text" name="name"></input></td>
                </tr>
                <tr>
                    <td>所在部门:</td>
                    <td>
                        <input id="deptid" class="easyui-comboBox" name="deptid"  
                        data-options="valueField:‘deptid‘,textField:‘deptname‘,url:‘DeptServlet‘" />  
                    </td>
                </tr>
                <tr>
                    <td>登录密码:</td>
                    <td><input class="easyui-textBox" type="password" name="password"></input></td>
                </tr>
                <tr>
                    <td><input type="submit" value="注册" class="easyui-linkbutton" id="btn_submit"></td>
                </tr>
            </table>    
        </form>
        </div>
    </div>

♦  改变为 Ajax 表单

<script type="text/javascript">
    $(function(){
        $("#ff").form({
            success:function(data){
                $.messager.alert("提示","注册成功!","icon-man",function(){
                    window.LOCATIOn.href="login.jsp";
                });
            }
        })
    })    
</script>

大佬总结

以上是大佬教程为你收集整理的JQuery EasyUI 表单全部内容,希望文章能够帮你解决JQuery EasyUI 表单所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。