ajax提交

简介:

ajax提交


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  
  //初始化加载档案列表信息
    $(function(){
       loadAccount();
   }); 
  
    function loadAccount(){
        var account = {};
        account.accountName = $( "#queryEmpCode" ).val();
        account.name = $( "#queryName" ).val();
              $.ajax({
                  type:  "post" ,
                  url:  "<%=context%>/rest/account/accountManage" ,
                  data: account,
                  dataType:  "json" ,
                  success: function(result){
                      $( "#tb_account" ).bootstrapTable( "destroy" );
                      $( "#tb_account" ).bootstrapTable({
                             data:result,
                             idField:  "accountId" ,
                             pagination:  true ,
                             pageSize:  15 ,
                             checkboxHeader: true ,
                             columns:[
                                 {
                                     field:  "accountId" ,
                                     title:  "主键" ,
                                     class "col-sm-3" ,
                                     visible:  false
                                 },
                                 {
                                   field:  "empId" ,
                                   title:  "员工ID" ,
                                   class "col-sm-2" ,
                                   visible:  false
                               },
                               {
                                     field:  "accountName" ,
                                     title:  "工号" ,
                                     class "col-sm-2"
                                 },
                               {
                                   field:  "name" ,
                                   title:  "姓名" ,
                                   class "col-sm-2" ,
                               },
                               {
                                   field:  "accountStatus" ,
                                   title:  "账户状态" ,
                                   class "col-sm-3" ,
                                   formatter: function(value) {
                                     return  accountStatus[value];
                                    }
                               },
                               {
                                   field:  "isWechartPucn" ,
                                   title:  "是否开启微信打卡" ,
                                   class "col-sm-3" ,
                                   formatter: function(value) {
                                      return  isWechartPunch[value];
                                   }
                               },
                                {
                                     field:  "createTimeStr" ,
                                     title:  "创建时间" ,
                                     class "col-sm-2" ,
                                },
                               {
                                   title:  "操作" ,
                                   class "col-sm-1" ,
                                   formatter: function(value, row, index) {
                                       return  '<button data-bindfunction="resetPassword" class="btn btn-primary btn-xs" data-rowid="'  + row.empId + '">重置密码</button>'
                                           + '&nbsp;<button data-bindfunction="modifyStatus" class="btn btn-danger btn-xs"  data-rowid="'  + row.empId + '" data-status="' +row.accountStatus+ '" data-isWechartPucn="' +row.isWechartPucn+ '">修改</button>' ;
                                   }
                               }
                             ]
                         });
                      
                     }
               });
          }






      本文转自建波李 51CTO博客,原文链接:http://blog.51cto.com/jianboli/1917855,如需转载请自行联系原作者




相关文章
|
前端开发 JavaScript
【jquery ajax】实现文件上传提交
【jquery ajax】实现文件上传提交
270 0
【jquery ajax】实现文件上传提交
|
JSON 前端开发 Java
Springboot接收ajax提交JSON数组
Springboot接收ajax提交JSON数组
548 0
|
开发框架 移动开发 前端开发
ASP.NET MVC中使用jQuery Ajax通过FormData对象异步提交图片文件到服务端保存并返回保存的图片路径
ASP.NET MVC中使用jQuery Ajax通过FormData对象异步提交图片文件到服务端保存并返回保存的图片路径
283 0
|
前端开发
pbootcms使用Ajax无刷新提交留言及表单
pbootcms使用Ajax无刷新提交留言及表单
468 0
|
JSON 前端开发 API
pbootcms使用Ajax无刷新提交留言及表单
pbootcms使用Ajax无刷新提交留言及表单
359 0
|
JavaScript 前端开发 PHP
jquery $.post 序列化表单ajax提交
jquery $.post 序列化表单ajax提交
108 0
|
JavaScript 前端开发 Python
Django实现ajax提交
场景:前端框架用layui, 提交的是textarea 页面: <form method="POST"> {% csrf_token %} <div class="layui-...
1462 0
|
JavaScript 前端开发 Python
Django中ajax技术和form表单两种方式向后端提交文件
一、Form表单方式提交: form表单提交文件或者图像时需要对form中的属性进行如下设置: 1、method="post" //提交方式 post 2、enctype="multipart/form-data" //不对字符编码。
1948 0