This article describes how to use jQuery to easily edit a table based on Bootstrap. For more information, see
EditTable. jsAllows you to edit the current row of a table, add a row, and delete the current row. You can set parameters, such:
OperatePos is used to set the placement operation column, starting from 0.-1 indicates that the last column is used as the placement operation column; (operations include
This tutorial is for editing a table (grid) with a drop-down list (Combobox), where the save is editable, showing the result slice:650) this.width=650; "src=" Http://www.itdatum.net/uploads/webui/2014/0808/20140808002.png "/>Example code:http://www.itdatum.net/webui/extjs/2014/08/7926.htmlOnline Demo:http://www.itdatum.net/online/extjs/examples-itdatum/grid-with-combobox-
Function:Click "cell selection" and use the direction key to change the selected cell. Press the Enter key or double-click the cell to enter the Editable State during the selection. When the cell loses focus, the modified content is saved.Main Implementation ideas:The selection and moving of selected regions are implemented by jQuery's powerful API. The editable cell actually adds an input field to the cell
Code for editable tables based on PHP + Jquery. For more information, see. Table. php
The Code is as follows:
Header ("Content-Type: text/html; charset = UTF-8 ");$ Mysqli = new MySQLi ("localhost", "root", "123456", "xiaoqiangdb ");If (mysqli_connect_errno ){Echo "failed to connect to Database". mysqli_connect_error ();Exit;}?> Editable
The results we will eventually achieve are as follows:
When you click on the Learning Number column, you can edit it:
When you click ESC, the action is canceled, and when you click Enter, the modification takes effect (no interaction with the background)The page code is as follows (asp.net):
CSS (EIDTTABLE.CSS)
Table
{
border:1px solid black;
Border-collapse:collapse;
width:500px;
}
A table that can be edited.
1. First write a page containing the table jqueryedit.html:
"Http://www.w3.org/TR/html4/loose.dtd" >
2. Write a JavaScript script file to complete the editable effect of the table, Jqueryedit.js:
in this file, when the input box after the change is submitted by the ENTER key, the following
The examples in this article describe the editable tables for jquery implementations. Share to everyone for your reference, specific as follows:
More interested readers of jquery-related content can view the site: "jquery table (table) Operation Tips Summary", "jquery common Plug-ins and Usage summary", "jquery Ajax Usage Summary", "jquery drag and drop
I have met this in niuyun's news publishing system, but I didn't learn jquery or Javascript at the time. Here I create a new editable table: Click it to edit it, when you exit, the cell content is saved. you can press the Enter key to save the cell content and Press ESC to exit and save the cell content.
Front-End Interface:
HTML code:
CSS:
Body {} table,
This article mainly introduces how to create editable table effects based on JQuery and provides two solutions. Can you tell me which solution is more reasonable? Recently, a project was created. project requirements: click a table and you can directly edit the project. Press ENTER or click another place on the page to edit the project. Press Esc to cancel editin
This article mainly introduces how to create editable Table effects based on JQuery and provides two solutions. can you tell me which solution is more reasonable? Recently, a project was created. project requirements: click a table and you can directly edit the project. press enter or click another place on the page to edit the project. press Esc to cancel editin
You can click a cell in the table at the front end to modify the content. Press enter to save the modified content. esc revokes the saved content. Today, we learned the example of using jQuery to edit a table. In this example, you can click a cell in the foreground table to modify the content. Press enter to save the modified content and esc to cancel the saved c
contents of the current text boxvar NewText = Input_blur.val ();Td.html (NewText);});Responding to keyboard eventsInput.keyup (function (event) {Get key valuevar keyevent = Event | | window.event;var key = Keyevent.keycode;Get current Objectvar Input_blur = $ (this);Switch (key){Case 13://Press ENTER to save the contents of the current text boxvar NewText = Input_blur.val ();Td.html (NewText);Break
Case 27://Press ESC to cancel the change and change the text box to textTd.html (OldText
1, click Object on the PowerPoint Insert menu, open the Insert Object dialog box, select Microsoft Word document, click OK, a Word edit box appears on the slide, and the Table menu appears in the menu bar. Then you can make and manipulate tables like you do in Word, and you can implement the operations and sorting of tables.
2, click Insert-Object
3, can be inserted in different forms of documents
4, immediately after inserting
After several years of web development, it is essential to learn jquery. I improved some of the collected plug-ins, changed some to jquer, and integrated multiple plug-ins, it is also a summary of learning. A Brief Introduction to the jfixed table plug-in,
Function:
Fixed Columns
You can edit the table directly.
Use ajax to operate data
Use the tab key to switch between
The main content of this article is JQuery's implementation of editable Table examples. For more information, see the following:
When you click the student ID column, you can edit it:
When you click ESC, the operation is canceled. when you click press enter, the modification takes effect (not interacting with the background)The page code is as follows (asp.net ):
I. React specifications
1.1 Role of react key
When rendering duplicate data,
React.diffVirtual Dom rendering will be performed based on the generated key, so we need to add the key in the traversal place, such as map, for, etc.
Similarly, antd, as the UI Component Library of react, must comply with the react key spec
:
Parameters
Type
Description
Default value
Title
String
Table Header Display Title
Data
String
Get the corresponding field name from the data source
Type
String
The type of the column. Types are: text, textarea, number, switch, Dropdown, IMG, DatePicker, DateTimePicker, Timepicker, hide, command
Query
Boolean
First introduce the overall style and the effect of the implementation, click the Add button will be followed by a new line, click on the delete icon will delete a row, if the number is deleted 1, the second line automatically becomes the first row ordinal will also change.PS: Data interaction is not yet implemented.Introduction Finished: The following topic!1. LayoutImport React, {Component, proptypes} from ' Rea
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.