欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery Easyui快速開發(fā)總結(jié)

 更新時(shí)間:2015年08月20日 16:11:47   投稿:mrr  
easyui是一種基于jQuery的用戶界面插件集合,easyui為創(chuàng)建現(xiàn)代化,互動(dòng),JavaScript應(yīng)用程序,提供必要的功能,本篇文章給大家整理有關(guān)jquery Easyui快速開發(fā)的技巧,需要的朋友可以參考下

最近工作很輕松,整理了些關(guān)于easyui的datagrid的開發(fā)文檔,整理的比較細(xì)致,直接復(fù)制粘貼就可以使用了。

代碼內(nèi)容如下:

 <link href="../../Content/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
   <link href="../../Content/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
   <script src="../../Scripts/jquery-...min.js" type="text/javascript"></script>
   <script src="../../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
   <script src="../../Scripts/easyui-lang-zh_CN.js" type="text/javascript"></script>
   <script src="../../Scripts/datapattern.js" type="text/javascript"></script>
 :<script type="text/javascript">
    $(function(){
       loadData();
    });
     function loadData() {
      $('#tt').datagrid({
         url: '/Home/GetUserInfo',
         title: '用戶數(shù)據(jù)表格',
         width: ,
         height: ,
         fitColumns: true, //列自適應(yīng)
         nowrap: false,
         idField: 'ID',//主鍵列的列明
         loadMsg: '正在加載用戶的信息...',
         pagination: true,//是否有分頁
         singleSelect: false,//是否單行選擇
         pageSize:,//頁大小,一頁多少條數(shù)據(jù)
         pageNumber: ,//當(dāng)前頁,默認(rèn)的
         pageList: [, , ],
         queryParams: {},//往后臺(tái)傳遞參數(shù)
         columns: [[//c.UserName, c.UserPass, c.Email, c.RegTime
           { field: 'ck', checkbox: true, align: 'left', width: },
           { field: 'ID', title: '編號(hào)', width: },
           { field: 'UserName', title: '姓名', width: },
           { field: 'UserPass', title: '密碼', width: },
            { field: 'Email', title: '郵箱', width: },
           { field: 'RegTime', title: '時(shí)間', width: , align: 'right',
             formatter: function (value, row, index) {
                 return (eval(value.replace(/\/Date\((\d+)\)\//gi, "new Date($)"))).pattern("yyyy-M-d");
               }
           }
         ]],
         toolbar: [{
           id: 'btnGet',
           text: '刪除',
           iconCls: 'icon-add',
           handler: function () {
             var rows = $('#tt').datagrid('getSelections');
             if (!rows || rows.length == ) {
               //alert("請選擇要修改的商品!");
               $.messager.alert("提醒", "請選擇要?jiǎng)h除的記錄!", "error");
               return;
             }
           }
         }],
       });
     }
   </script>
 <div>
   <table id="tt" style="width: px;" title="標(biāo)題,可以使用代碼進(jìn)行初始化,也可以使用這種屬性的方式" iconcls="icon-edit">
   </table>
 </div>
  //將序列化成json格式后日期(毫秒數(shù))轉(zhuǎn)成日期格式
 function ChangeDateFormat(cellval) {
   var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), ));
   var month = date.getMonth() + < ? "" + (date.getMonth() + ) : date.getMonth() + ;
   var currentDate = date.getDate() < ? "" + date.getDate() : date.getDate();
   return date.getFullYear() + "-" + month + "-" + currentDate;
 }

以上代碼示例給大家分享了jquery Easyui快速開發(fā),希望大家喜歡。

相關(guān)文章

最新評(píng)論