General Introduction
Before the CSS technology, the layout of the Web page is basically based on the form, when the CSS, the table was abandoned by many designers, but the table also has his use, such as the list of data, the following table in a few common applications to deepen the understanding of jquery.
Add Table data on the JQuery page and implement pagination
Use JQuery to add and pagination table data on the page. For more information, see.
The Code is as follows:
Var countPage;
Var nowPag = 1;
Var pageSize;
Var countSize;
Var starIndex;
Var endIndex;
// Information submitted by the user
Var name;
Var sex;
Var a
Editor class
++ ++
Jwysiwyg
WYSIWYG jquery plugin. The size of the entire editor file is only 17kb.
Jwysiwyg
Damn small Rich Text Editor
Developed based on jquery, you can create a Rich Text Editor from the IFRAME element. Provides all basic rich text functions, including setting the size of the text editing area and uploading images through Ajax.
Damn small Rich Text Editor
++ ++
The form is very familiar to everyone, today's CSS also makes the layout of the table more and more glorious people. But, in any case, can not conceal the rigid under the packaging.
So how to make those rigid data more readable, usability, can let us that data is "move"?
Here we use Jquery+ajax to inject some energy into the table. The main implementation of th
1. Create a js file jQuery_FixedTableHead.js
The content is as follows:
Copy codeThe Code is as follows: jQuery. fn. CloneTableHeader = function (tableId, tableParentDivId ){
Var obj = document. getElementById ("tableHeaderDiv" + tableId );
If (obj ){
JQuery (obj). remove ();
}
Var browserName = navigator. appName;
Var ver = navigator. appVersion;
Var browserVersion = parseFloat (ver. substring (ver. inde
; //Helper function that gets a count of all the rows
Articles you may be interested in:
JQuery method for obtaining the value of the first column in the table
JQuery plug-in implements code for table line-changing and mouse-over-highlighted display
JQuery-based paging
First of all, we introduce the full selection and Ckeckbox function of the jquery implementation table and the form.
First look at the following effect:
When the user clicks the checkbox for the header, all the table data rows are selected or reversed by the checkbox.
The header checkbox is selected when a row of
text box object of the billing weight and rate, and calculate the freight according to the formula.
The total cost is not hard to achieve. traverse all the expense objects in the entire table, calculate the sum, and place the calculation result to the total text box object.
It is quite difficult to dynamically Add the entire row of table data, and to automatical
This article illustrates the non-refresh table paging based on jquery implementation. Share to everyone for your reference, specific as follows:
The effect chart is as follows:
HTML structure:
CSS style:
html,body{margin:0;padding:0} a:focus {Outline:none}//* universal table display/table, TH, td
Function implementation: Click the Add button, the table adds a row and gives its name attribute to the value, to facilitate access to
Click Delete to delete this line automatically
Define a Count variable in jquery
var count = 1;
function Add () {
var tbl = document.all.ci;
var rows = tbl.rows.length;
var tr = tbl.insertrow (rows);
var e_id = Tr.insertce
can use the Columns.render attribute, Usage is as follows:
{
title: "Action", Orderable:false, Render:function (data,type,full) {return
'
Note that the render function has three parameters, Data/type/full, where the full parameter is a row of all the data (official website Here Note: Only the data in the row, not the value of the Data property, so even if you have the value of data, but y
Ctrl+fOn a large amount of data pages, the most common way to find resources is "ctrl+f", which can save a lot of time and energy. and jquery to the DOM operation, can also achieve this effect, if there is a table, there are hundreds of data, how can you more accurately get the data you want? Let me give you a good analysis and analysis!CodeA tablejquery operations$ (function () {$ (' #button '). Bind (' cl
footable is a jQuery plugin that allows table to perform better on mobile devices, primarily to turn HTML tables into devices that support a variety of sizes, especially on small-screen devices. You don't have to worry about having too many columns for the table. Footable is a very powerful tabular component. Github:https://github.com/bradvin/FooTable#readmeOpe
of the text box object of the billing weight and rate, and calculate the freight according to the formula.
The total cost is not hard to achieve. traverse all the expense objects in the entire table, calculate the sum, and place the calculation result to the total text box object.
It is quite difficult to dynamically Add the entire row of table data, and to
objects on each row of data. If you want to use JavaScript to call the Dom object to create a cell, you also need to add more than 10 cell objects in tr, and add text box objects in each cell object, you also need to respond to the onblur event on the text box object for freight calculation. The amount of code is quite large.
JQuery can greatly reduce the workload. In actual development, the clone (true) f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.