Home Web Front-end JS Tutorial jquery Easyui rapid development summary_jquery

jquery Easyui rapid development summary_jquery

May 16, 2016 pm 03:43 PM
easyui Plug-in development

Work has been very easy recently. I have compiled some development documents about easyui's datagrid. They are quite detailed and can be used directly by copying and pasting them.

The code content is as follows:

 <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: '用户数据表格',
         width: ,
         height: ,
         fitColumns: true, //列自适应
         nowrap: false,
         idField: 'ID',//主键列的列明
         loadMsg: '正在加载用户的信息...',
         pagination: true,//是否有分页
         singleSelect: false,//是否单行选择
         pageSize:,//页大小,一页多少条数据
         pageNumber: ,//当前页,默认的
         pageList: [, , ],
         queryParams: {},//往后台传递参数
         columns: [[//c.UserName, c.UserPass, c.Email, c.RegTime
           { field: 'ck', checkbox: true, align: 'left', width: },
           { field: 'ID', title: '编号', width: },
           { field: 'UserName', title: '姓名', width: },
           { field: 'UserPass', title: '密码', width: },
            { field: 'Email', title: '邮箱', width: },
           { field: 'RegTime', title: '时间', 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("提醒", "请选择要删除的记录!", "error");
               return;
             }
           }
         }],
       });
     }
   </script>
 <div>
   <table id="tt" style="width: px;" title="标题,可以使用代码进行初始化,也可以使用这种属性的方式" iconcls="icon-edit">
   </table>
 </div>
  //将序列化成json格式后日期(毫秒数)转成日期格式
 function ChangeDateFormat(cellval) {
   var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), ));
   var month = date.getMonth() + < &#63; "" + (date.getMonth() + ) : date.getMonth() + ;
   var currentDate = date.getDate() < &#63; "" + date.getDate() : date.getDate();
   return date.getFullYear() + "-" + month + "-" + currentDate;
 }
Copy after login

The above code examples share with you the rapid development of jquery Easyui, I hope you like it.

Statement of this Website
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

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 ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is easyui a jquery plug-in? Is easyui a jquery plug-in? Jul 05, 2022 pm 06:08 PM

easyui is a jquery plug-in. easyui is a front-end UI interface plug-in based on JQuery, which is used to help web developers more easily create feature-rich and beautiful UI interfaces. easyui is a framework that perfectly supports HTML5 web pages, which can help developers save the time and scale of web development.

How to use the flash sale plug-in of PHP Developer City How to use the flash sale plug-in of PHP Developer City May 22, 2023 pm 11:31 PM

With the continuous development of the e-commerce market, the methods of selling goods are also constantly updated and iterated. Among them, flash sale activities have become an important part of e-commerce platform marketing, which can attract more users' attention and increase sales. The core of the flash sale activity is an efficient and stable flash sale plug-in. This article will introduce how to use the flash sale plug-in of PHP Developer City. 1. Understand the principle of flash sale plug-in Before developing the flash sale plug-in, we need to understand the principle of flash sale first. When conducting flash sales activities, a time period is usually set, and users can only

Develop custom WordPress plugins using PHP Develop custom WordPress plugins using PHP May 26, 2023 am 11:40 AM

With the development of WordPress, more and more users need to customize the functions of WordPress websites. To meet this need, developing your own WordPress plugin is a good option. In this article, we will discuss how to develop custom WordPress plugins using PHP. First, let’s understand the structure of WordPress plugins. In WordPress, plugins are implemented through a folder and must contain a specified file

How to use JavaScript to develop debugging tools and plug-ins How to use JavaScript to develop debugging tools and plug-ins Jun 15, 2023 pm 12:35 PM

JavaScript plays a very important role in modern web application development. During the development process, we often encounter situations where we need to develop debugging tools and plug-ins. This article helps readers quickly master related skills by introducing JavaScript debugging tools and plug-in development methods. 1. Development of debugging tools 1. Console The console is one of the most familiar debugging tools for web developers. It provides developers with an interface to record and process debugging information directly in web applications. The console can

Detailed explanation of PHP underlying development principles: plug-in development and extension mechanism implementation Detailed explanation of PHP underlying development principles: plug-in development and extension mechanism implementation Sep 09, 2023 am 09:25 AM

Detailed explanation of the underlying development principles of PHP: plug-in development and extension mechanism implementation Introduction: During the development process of PHP applications, we often use various plug-ins and extensions to increase functionality and performance. How are these plug-ins and extensions implemented? This article will analyze in detail the implementation principles of PHP plug-in development and extension mechanisms from the perspective of underlying development, with code examples attached. 1. Plug-in development A plug-in can be understood as an optional, pluggable functional component that can be run and expanded independently in an application. In PHP, the key to plug-in development is to use

Use PHP and jQuery EasyUI to develop an efficient backend management system Use PHP and jQuery EasyUI to develop an efficient backend management system Jun 27, 2023 pm 01:21 PM

With the development of the Internet, more and more companies need to develop an efficient back-end management system to manage and process data to provide strong support for the development of the company. In this context, PHP and jQueryEasyUI have become very popular development technologies. PHP is a widely used server-side scripting language. It has the advantages of open source, cross-platform, easy to learn and use, and has a rich function library and a large number of open source frameworks, which can quickly build an efficient backend management system. And jQueryEasyU

How to add backup and restore functionality to WordPress plugin How to add backup and restore functionality to WordPress plugin Sep 05, 2023 pm 07:09 PM

How to add backup and restore function to WordPress plug-in When using WordPress to develop plug-ins, the backup and restore function is a very important function. It can help us easily save and restore data when there is a problem with the plug-in or the website needs to be migrated. This article will explain how to add backup and restore functionality to a WordPress plugin and provide code examples. Create a database table First, we need to create a database table to store the backup data. Open phpMyAdmin or other number

Explore jQuery EasyUI web design inspiration and tips Explore jQuery EasyUI web design inspiration and tips Feb 25, 2024 pm 09:12 PM

jQueryEasyUI is a user interface plug-in framework based on jQuery. It provides a wealth of easy-to-use interface components and plug-ins, which can help developers quickly build beautiful and powerful web pages. In this article, we will explore the web design inspiration and techniques brought by using jQuery EasyUI, and give specific code examples. 1. Responsive layout Responsive design is an important trend in modern web design, which allows web pages to present the best user experience on different devices. jQuery

See all articles