jquery Easyui rapid development summary_jquery
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() + < ? "" + (date.getMonth() + ) : date.getMonth() + ; var currentDate = date.getDate() < ? "" + date.getDate() : date.getDate(); return date.getFullYear() + "-" + month + "-" + currentDate; }
The above code examples share with you the rapid development of jquery Easyui, I hope you like it.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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.

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

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

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 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

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 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

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
